azurerm_databricks_workspace: allow hsm key in managed_services_cmk_key_vault_key_id and managed_disk_cmk_key_vault_key_id#31528
Conversation
3a5627a to
4022d6c
Compare
| } else if strings.HasPrefix(sub, "2350ac68") { | ||
| // update databricks principal id of tenant: azclitools20251114 | ||
| // intended not use azuread data source as test service principal may not have directory read permissions | ||
| databricksPrincipalID = "2f1b5070-cfa2-4b49-8a3d-ba64dfcd4a83" |
There was a problem hiding this comment.
Since this is tied to a specific subscription, should we consider reading it from environment variables?
There was a problem hiding this comment.
Good idea, I updated the logic to get the service principal from env var at first.
There was a problem hiding this comment.
I've made the change at: https://github.com/hashicorp/terraform-provider-azurerm/pull/31509/changes. So please expect conflict once that PR is merged.
|
There is a property |
|
I tested in Portal with a versonless key+rotation enabled, update failed with: |
|
Thanks @wuxu92 , LGTM! |
|
test result: |
Community Note
Description
extend HSM keys support for
managed_services_cmk_key_vault_key_idandmanaged_disk_cmk_key_vault_key_id. Skip the acctest by default as the cost of HSM test. No need to update the documentation.changed the validate function from
keyVaultValidate.KeyVaultChildIDtokeyvault.VersionTypeVersioned, because the API requires the key version field otherwise the api errors likeCreateOrUpdate: unexpected status 400 (400 Bad Request) with error: InvalidEncryptionEntitiesKeyVaultValue: The keysource is specified as keyvault but keyvault details are not correctly providedhttps://learn.microsoft.com/en-us/azure/databricks/security/keys/cmk-managed-services-azure/cmk-hsm-managed-services-azure#step-3-add-a-key-to-a-workspace
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_databricks_workspace: allow hsm key inmanaged_services_cmk_key_vault_key_idandmanaged_disk_cmk_key_vault_key_idThis is a (please select all that apply):
Related Issue(s)
Fixes #27738
AI Assistance Disclosure
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.