Skip to content

Commit 929ac6e

Browse files
author
Sushanth Varma Kanumuri
authored
Fixed bug in secrets CLI by initializing keyvault dict to none (#336)
1 parent 8fd4ca9 commit 929ac6e

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

databricks_cli/secrets/cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ def create_scope(api_client, scope, initial_manage_principal,
7373
"""
7474
Creates a new secret scope with given name.
7575
"""
76-
backend_azure_keyvault = {
77-
'resource_id': resource_id,
78-
'dns_name': dns_name
79-
}
76+
backend_azure_keyvault = None
77+
78+
if resource_id is not None and dns_name is not None:
79+
backend_azure_keyvault = {
80+
'resource_id': resource_id,
81+
'dns_name': dns_name
82+
}
8083
SecretApi(api_client).create_scope(scope, initial_manage_principal,
8184
scope_backend_type, backend_azure_keyvault)
8285

0 commit comments

Comments
 (0)