英文:
databricks secrets create-scope backend-type KEYVAULT must have AzureKeyVaultSecretScopeMetadata defined
问题
我想使用CLI在Databricks中创建一个支持KeyVault的秘密作用域。
以下命令:
databricks secrets create-scope "keyvault_nonHR_QUA" --scope-backend-type AZURE_KEYVAULT
给我返回了Error: Scope with Azure KeyVault must have AzureKeyVaultSecretScopeMetadata defined!
错误。
而以下命令:
databricks secrets create-scope "myscope" --scope-backend-type AZURE_KEYVAULT --resource-id "<azure-keyvault-resource-id>" --dns-name "<azure-keyvault-dns-name>" --initial-manage-principal users
给我返回了Error: unknown flag: --resource-id
错误。
任何帮助都受欢迎。
英文:
I want to create a keyvault-backed secret scope in databricks USING THE CLI.
databricks secrets create-scope "keyvault_nonHR_QUA" --scope-backend-type AZURE_KEYVAULT
gives me Error: Scope with Azure KeyVault must have AzureKeyVaultSecretScopeMetadata defined!
while:
databricks secrets create-scope "myscope" --scope-backend-type AZURE_KEYVAULT --resource-id "<azure-keyvault-resource-id>" --dns-name "<azure-keyvault-dns-name>" --initial-manage-principal users
gives Error: unknown flag: --resource-id
The doc seems to refer to the legacy CLI
https://learn.microsoft.com/en-us/azure/databricks/security/secrets/secret-scopes#--create-an-azure-key-vault-backed-secret-scope-using-the-databricks-cli
any help welcome
答案1
得分: 1
我在使用 Databricks CLI v0.204.0
时也遇到了同样的问题。我找到的唯一解决方法是使用 --json 标志。
例如...
databricks secrets create-scope --json "{
\"scope\": \"kduenke-testing\",
\"scope_backend_type\": \"AZURE_KEYVAULT\",
\"backend_azure_keyvault\": {
\"resource_id\": \"/subscriptions/<--SUBSCRIPTION_GUID-->/resourceGroups/<--RESOURCE_GROUP_NAME-->/providers/Microsoft.KeyVault/vaults/<--KEY_VAULT_NAME-->\",
\"dns_name\": \"https://<--KEY_VAULT_NAME-->.vault.azure.net/\"
}
}"
英文:
I faced this same issue using Databricks CLI v0.204.0
. The only way I found to remedy this was to use the --json flag.
For example...
databricks secrets create-scope --json "{\"scope\": \"kduenke-testing\", \"scope_backend_type\": \"AZURE_KEYVAULT\", \"backend_azure_keyvault\": { \"resource_id\": \"/subscriptions/<--SUBSCRIPTION_GUID-->/resourceGroups/<--RESOURCE_GROUP_NAME-->/providers/Microsoft.KeyVault/vaults/<--KEY_VAULT_NAME-->\", \"dns_name\": \"https://<--KEY_VAULT_NAME-->.vault.azure.net/\" } }"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论