Skip to content

Commit

Permalink
Fix KeyVault backed Scope Bug (DataThirstLtd#187)
Browse files Browse the repository at this point in the history
KeyVault DNS are always lowercase and are case sensitive. When you have a KeyVault named with any uppercase characters this operation will fail saying that the KeyVault DNS doesn't exist. making the $LastPart variable lowercase fixes this bug.
  • Loading branch information
mwc360 authored Dec 3, 2021
1 parent 691ba10 commit 5256d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Public/Add-DatabricksSecretScope.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Function Add-DatabricksSecretScope
if ($PSBoundParameters.ContainsKey('KeyVaultResourceId')){
$kv = @{}
$kv['resource_id'] = $KeyVaultResourceId
$LastPart = $KeyVaultResourceId.split('/')[-1]
$LastPart = ($KeyVaultResourceId.split('/')[-1]).toLower()
$kv['dns_name'] = "https://$LastPart.vault.azure.net/"

$body['scope_backend_type'] = 'AZURE_KEYVAULT'
Expand Down

0 comments on commit 5256d43

Please sign in to comment.