-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Recovered key vault has old network acls #18970
Comments
Hi @twendt, thank you for reaching out. |
Would it not be possible to update they key vault again after recovering it? |
Hi @twendt, since creating and updating a resource in the same operation is not a common case in the provider, we need to do more investigation on it. |
If it results in a viable workflow, we could update the key vault after recovering the soft deleted key vault. |
Ran in to same issue last week while running through process to destroy and re-create a test env. |
Is there an existing issue for this?
Community Note
Terraform Version
1.3.3
AzureRM Provider Version
3.28.0
Affected Resource(s)/Data Source(s)
azurerm_key_vault
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The given IP should be configured in the network acls and also the subnet should be configured in the network acls.
Actual Behaviour
The network acls are the ones that the where configured on the old deleted key vault.
The plan does actually show correct entries and the apply runs successfully. But afterwards the network acls do not match the configuration.
The vnet rule is deleted after the apply. This however might be how it works in Azure. If the vnet has been deleted, like in the example below, then the vnet rule in the network acls is deleted after the recover. If the vnet has not been deleted, but only the key vault, then the vnet rule still exists in the recovered key vault.
The IP rules are always wrong.
Running another terraform apply fixes the issue. This should not be required though.
Steps to Reproduce
terraform apply -var 'ip=1.2.3.4'
terraform destroy
terraform apply -var 'ip=1.2.3.5'
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: