-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Key Vault createMode setup #21334
Comments
Hi @vigor-vavan thanks for your feedback. azurerm provider will set the could you please share the terraform configuration that cause this error? |
Hi @wuxu92 @vigor-vavan is on vacation so he can't answer, we work together so i will answer instead of him. On following image you can see terraform configuration that causes this error. |
Hi @DjordjeTosic, thanks for your response. actually terraform azurerm provider will set the terraform-provider-azurerm/internal/services/keyvault/key_vault_resource.go Lines 279 to 287 in a872bf3
terraform-provider-azurerm/internal/services/keyvault/key_vault_resource.go Lines 341 to 343 in a872bf3
|
Hi @wuxu92, I understand that terraform is setting CreateMode field to Recover when some key vault is deleted and then when you recover, terraform will set value for that property (if soft delete was set on true), but why don't u set it when Key Vault is initially created? It doesn't need to be set to Recover, it can be set to default value, because in this case that property doesn't exist in ARM template of key Vault and that's why policy fails and reports that value for that property is "--". |
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. |
Is there an existing issue for this?
Community Note
Terraform Version
1.3.6
AzureRM Provider Version
3.51.0
Affected Resource(s)/Data Source(s)
azurerm_key_vault
Terraform Configuration Files
There is no resource property.
Debug Output/Panic Output
Expected Behaviour
To be able to set key vault property createMode
and to be compliant with build in policy 'Azure Key Vault should have firewall enabled'.
New version of build in policy 'Azure Key Vault should have firewall enabled' is now GA.(version 3.1.0)
All previously created key vaults are now non compliant .
Actual Behaviour
It is not possible to set key vault property createMode with terraform resources.
Steps to Reproduce
Look at the azurerm_key_vault_key resource.
There is no possiblity to set createMode to recover.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: