Terraform v0.11.7
resource "aws_waf_web_acl" "global_waf_acl" {
name = "GlobalWAF"
metric_name = "GlobalWAF"
default_action { type = "ALLOW" }
rules {
action { type = "BLOCK" }
priority = 1
rule_id = "${aws_waf_rate_based_rule.brute_force_rule.id}"
type = "RATE_BASED"
}
rules {
action { type = "BLOCK" }
priority = 2
rule_id = "${aws_waf_rule.auto_block_list_rule.id}"
type = "REGULAR"
}
}
resource "aws_waf_web_acl" "global_waf_acl" {
name = "GlobalWAF"
metric_name = "GlobalWAF"
default_action { type = "ALLOW" }
rules {
action { type = "BLOCK" }
priority = 1
rule_id = "${aws_waf_rate_based_rule.brute_force_rule.id}"
type = "RATE_BASED"
}
rules {
action { type = "BLOCK" }
priority = 2
rule_id = "${aws_waf_rule.new_rule.id}"
type = "REGULAR"
}
rules {
action { type = "BLOCK" }
priority = 3
rule_id = "${aws_waf_rule.auto_block_list_rule.id}"
type = "REGULAR"
}
}
* aws_waf_web_acl.global_waf_acl: Error Updating WAF ACL: Error Updating WAF ACL: ValidationException: Cannot allow rule <ID> with priority 2. Another rule already has this priority.
resource "aws_waf_web_acl" "global_waf_acl" {
name = "GlobalWAF"
metric_name = "GlobalWAF"
default_action { type = "ALLOW" }
rules {
action { type = "BLOCK" }
priority = 1
rule_id = "${aws_waf_rate_based_rule.brute_force_rule.id}"
type = "RATE_BASED"
}
}
aws_waf_web_acl.global_waf_acl: Modifications complete after 1s
All rules are still attached to WAF in AWS Console
I should be able to update rule priorities.
I should also be able to remove rules and have them removed from the WAF
Priority conflict.
Rules still present.
See above HCL
The fix for this has been merged into master and will release with version 1.30.0 of the AWS provider, likely on Wednesday. 👍
This has been released in version 1.30.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
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. Thanks!
Most helpful comment
The fix for this has been merged into master and will release with version 1.30.0 of the AWS provider, likely on Wednesday. 👍