-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Updates to rules inside wafv2 web acl forces recreation for all rules #25669
Comments
This seems to be the same underlying problem as #23992 and friends. |
Experiencing this as well, linked issue says it should be resolved by:
but am seeing with:
and also after upgrading to:
In my case it's with hardcoded rules, not dynamic. Happy to open a related issue if that's the protocol to follow. Thanks! |
We're having this problem too, which makes it very hard to understand if the WAF rules are actually changing when we review PRs with terraform plans posted to them with a large diff that indicates rules are being removed/recreated. I don't know much about the implementation details, but I did look into the provider code a bit, and it appears that the WAF rules are being stored in memory as a Set, which is unordered: Looking at the API response for Could this be fixed by using an ordered list data structure to store the rules in the provider implementation? |
I had also this problem without any code or aws changes |
I'm encountering this with the following:
I have a mixture of custom and managed waf rules. In my most recent apply, I had 5 managed rules (already applied in the past), 1 custom rule (applied in past), and 1 new custom rule I was adding. The diff showed 4 of the 5 managed rules being removed and being added back, as well as my new rule. |
We are having the same issue. We also tried ordering the rules by priority, but the plan shows a difference when we expect no changes. Terraform v1.10.3
|
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform version: 1.2.2
provider registry.terraform.io/hashicorp/aws v4.21.0
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
Terraform plan output will only show the affected rules, and not show all rules each time a change in a rule is introduced.
Actual Behavior
Terraform shows all the rules being recreated.
Steps to Reproduce
terraform apply
terraform apply
References
Issue 13936 (linked below) seems to be the same problem but in that ticket it was fixed in version 3 of the provider, maybe changes between version 3 and 4 of the provider changed this behavior.
The text was updated successfully, but these errors were encountered: