You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By providing a managed HSM ID like "/subscriptions/.../resourceGroups/.../providers/Microsoft.KeyVault/managedHSMs/YOURHSM" it should setup the encryption similar to: az storage account update --name ... --resource-group ... --encryption-key-name ... --encryption-key-source Microsoft.Keyvault --encryption-key-vault $YOURHSMURL --subscription ...
Actual Behaviour
│ Error: ID was missing the `vaults` element
│
│ with module.storagecontainer.azurerm_storage_account_customer_managed_key.this,
│ on .terraform/modules/storagecontainer/main.tf line 65, in resource "azurerm_storage_account_customer_managed_key" "this":
│ 65: key_vault_id = var.azurerm_storage_account_customer_managed_key_key_vault_id
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_storage_account_customer_managed_key
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
By providing a managed HSM ID like "/subscriptions/.../resourceGroups/.../providers/Microsoft.KeyVault/managedHSMs/YOURHSM" it should setup the encryption similar to:
az storage account update --name ... --resource-group ... --encryption-key-name ... --encryption-key-source Microsoft.Keyvault --encryption-key-vault $YOURHSMURL --subscription ...
Actual Behaviour
This happens it checks just for classic KeyVaults via:
https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/keyvault/parse/vault.go#L60
while:
https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/keyvault/parse/managed_hsm.go#L60
should be respected too.
Was first thinking to open a feature request but since both are KeyVaults I think it is more a bug.
Steps to Reproduce
key_vault_id
inazurerm_storage_account_customer_managed_key
.Important Factoids
References
The text was updated successfully, but these errors were encountered: