$ 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
aws_wafregional_rule_groupresource "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"
}
}
}
* 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
According to documentation: https://www.terraform.io/docs/providers/aws/r/wafregional_rule_group.html
type - (Required) e.g. BLOCK, ALLOW, or COUNT
I specified ALLOW as the type and was told it was invalid.
Valid actions for rules within rulegroup are BLOCK and COUNT.
terraform applyTurns 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!