Closed aglees closed 3 years ago
I have the same issue and it try destroy the firewall for any change in any dependency that azurerm_firewall has. Even for a simple tag if you have a tag in any resource that azurerm_firewall depends on it will force the recreation of the whole firewall. I tested multiple times and it's always the same behavior. If you remove all dependencies and manually pass everything as a string it stop happening. Definitely it's a bug.
@aglees Thank you for submitting this! I've tried to reproduce it locally with the same provider version you've used (v2.52.0), with the configuration in the doc site, but can't reproduce it. Would you please give me some more detailed steps to reproduce this? A rough guess is that the firewall has been managed outside of Terraform (e.g. via other clients, like Portal/CLI), which might not conform to the Terraform convention about resource IDs and send out the resource group segment in upper case, the service team then reserve the case. Later, when you try to manage it back in Terraform, it gives you the diff.
@Welasco IIRC, once the subnet is used by a firewall, it is not able to be updated, otherwise, you'll get InUseSubnetCannotBeUpdated
error. Would you also kindly provide me the detailed steps that you've done, which will cause the firwall to be replaced?
Closing this out since we've not heard back here - if your able to provide the information that @magodo has requested above then we can take another look, however.
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_firewall
Terraform Configuration Files
Debug Output
Panic Output
Expected Behaviour
Terraform doesn't want to destroy and re-create the Azure Firewall
Actual Behaviour
Terraform wants to destroy and re-create the Azure Firewall
Steps to Reproduce
terraform apply
Important Factoids
References
0000