Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to automating adding Keyvault scope for azure data bricks service.

Tried to use example from "azure.databricks.cicd.tools/Add-DatabricksSecretScope.tests.ps1 at master · DataThirstLtd/azure.databricks.cicd.tools · GitHub[^] and implemented below script.

$Region = "southindia"
$ResID = "/subscriptions/*******/resourceGroups/******/providers/Microsoft.KeyVault/vaults/testkv123d"
$databricsOrgId = **********
 

Connect-Databricks -Region $Region -DatabricksOrgId $databricsOrgId `
-ApplicationId ************ `
-Secret ************ -TenantId ************  -Verbose

Connect-Databricks -Region $Region -ApplicationId ************** `
            -Secret ****************** `
            -ResourceGroupName ******* `
            -SubscriptionId ****************************** `
            -WorkspaceName *********** `
            -TenantId ********** -Verbose

Add-DatabricksSecretScope -ScopeName "kvscope" -Verbose -KeyVaultResourceId $ResID


The issue I have got below
VERBOSE: POST https://southindia.azuredatabricks.net/api/2.0/secrets/scopes/create with -1-byte payload
Invoke-RestMethod : {"error_code":"INTERNAL_ERROR","message":"There was an internal error handling request POST to /api/2.0/secrets/scopes/create. Please try again later."}
At C:\Program Files\WindowsPowerShell\Modules\azure.databricks.cicd.tools\2.0.55\Public\Add-DatabricksSecretScope.ps1:73 char:9
+         Invoke-RestMethod -Method Post -Body $BodyText -Uri "$global: ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand


Please help me resolve the issue.

What I have tried:

$Region = "southindia"
$ResID = "/subscriptions/*******/resourceGroups/******/providers/Microsoft.KeyVault/vaults/testkv123d"
$databricsOrgId = **********
 

Connect-Databricks -Region $Region -DatabricksOrgId $databricsOrgId `
-ApplicationId ************ `
-Secret ************ -TenantId ************  -Verbose

Connect-Databricks -Region $Region -ApplicationId ************** `
            -Secret ****************** `
            -ResourceGroupName ******* `
            -SubscriptionId ****************************** `
            -WorkspaceName *********** `
            -TenantId ********** -Verbose

Add-DatabricksSecretScope -ScopeName "kvscope" -Verbose -KeyVaultResourceId $ResID
Posted
Updated 21-Jan-20 2:39am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900