Terraform-provider-aws: WAF Regional Rule Group documentation specifies invalid action

Created on 13 Dec 2018  ยท  3Comments  ยท  Source: hashicorp/terraform-provider-aws

Terraform Version

$ terraform version
Terraform v0.11.7
+ provider.aws v1.51.0

Your version of Terraform is out of date! The latest version
is 0.11.10. You can update by downloading from www.terraform.io/downloads.html

Affected Resource(s)

  • aws_wafregional_rule_group

Terraform Configuration Files

resource "aws_wafregional_rule_group" "allowed" {
  name        = "tf-allowed"
  metric_name = "tfAllowed"

  rule {
    priority = 100
    rule_id  = "${aws_wafregional_rule.allowed-countries.id}"

    action {
      type = "ALLOW"
    }
  }
}

Debug Output

* aws_wafregional_rule_group.allowed: Error Updating WAF Regional Rule Group: Error Updating WAF Regional Rule Group: ValidationException: Invalid action for rule 0080f004-cafe-4796-9177-4665cd52bf18. Valid actions for rules within rulegroup are BLOCK and COUNT.
    status code: 400, request id: a6e8a935-fe7e-11e8-9d24-bd84577f7a70

Expected Behavior

According to documentation: https://www.terraform.io/docs/providers/aws/r/wafregional_rule_group.html

type - (Required) e.g. BLOCK, ALLOW, or COUNT

Actual Behavior

I specified ALLOW as the type and was told it was invalid.

Valid actions for rules within rulegroup are BLOCK and COUNT.

Steps to Reproduce

  1. terraform apply
bug servicwaf upstream

All 3 comments

Turns out this is not an issue of terraform. The same happens by trying to add ALLOW rules to a group by AWS CLI. I contacted AWS support, they confirmed the bug is in the AWS API.

Closing as this seems to be fixed in the upstream API -- I'm not able to reproduce in both v1.51.0 and the most recent version of the provider.

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