Terraform-provider-aws: AWS WAF web acl creates new rule instead of updating

Created on 13 Jun 2017  ·  7Comments  ·  Source: hashicorp/terraform-provider-aws

_This issue was originally opened by @orbitalone1 as hashicorp/terraform#11959. It was migrated here as part of the provider split. The original body of the issue is below._


Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

v0.8.6

Affected Resource(s)

resource "aws_waf_web_acl"

Terraform Configuration Files

resource "aws_waf_web_acl" "waf_acl" { depends_on = ["aws_waf_rule.rule1", "aws_waf_rule.rule3", "aws_waf_rule.rule2", "aws_waf_rule.rule4", "aws_waf_rule.Rule_rule5", "aws_waf_rule.rule6"] name = "TFWaf_ACL" metric_name = "TFWafAcl" default_action { type = "ALLOW" } rules { action { type = "BLOCK" } priority = 2 rule_id = "${aws_waf_rule.rule3.id}" } rules { action { type = "BLOCK" } priority = 3 rule_id = "${aws_waf_rule.rule2.id}" } rules { action { type = "BLOCK" } priority = 4 rule_id = "${aws_waf_rule.rule1.id}" } rules { action { type = "BLOCK" } priority = 5 rule_id = "${aws_waf_rule.rule4.id}" } rules { action { type = "BLOCK" } priority = 6 rule_id = "${aws_waf_rule.Rule_rule5.id}" } rules { action { type = "ALLOW" } priority = 8 rule_id = "${aws_waf_rule.Rule_rule5.id}" } rules { action { type = "BLOCK" } priority = 7 rule_id = "${aws_waf_rule.rule6.id}" } }

Expected Behavior

Rule should update with new parameters.

Actual Behavior

New rule was created, keeping the original one.

Steps to Reproduce

  1. Apply code above.
  2. Change one of the rules from BLOCK to ALLOW or change the priority order.
  3. Reapply.
  4. TF destroy will remove all rules.
bug servicwaf

Most helpful comment

The fix for this has been merged into master and will release with version 1.30.0 of the the AWS provider, likely on Wednesday. 👍

All 7 comments

I can confirm this is still a problem in Terraform v0.9.11

Is there any update?

still broken in terraform 0.10.8

Still occurring in 0.11.2

The fix for this has been merged into master and will release with version 1.30.0 of the 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!

Was this page helpful?
0 / 5 - 0 ratings