$ terraform -v
Terraform v0.11.11
+ provider.azurerm v1.20.0
All of the necessary Terraform templates to recreate this issue are in this gist.
Terraform should have added/updated the tags on the Firewall.
Terraform added/updated the tags on the Firewall, and also deleted the network rule collection.
A subsequent terraform plan included the (re)creation of the network rule collection.
terraform plan and terraform apply.azurerm_firewall resource, e.g. add a new tag or edit an existing one in terraform.tfvars.terraform plan and terraform apply again.
Our discovery of this issue came when updating tags to meet compliance, and the inadvertent removal of the above network rule collection led to some resources not having internet access briefly.
I see the problem - the API treats the firewall as one big object so when the tags are updated it is overwriting the rules. I've submitted a PR to resolve
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
I see the problem - the API treats the firewall as one big object so when the tags are updated it is overwriting the rules. I've submitted a PR to resolve