Closed CKozanecki closed 3 years ago
Would love some help figuring out what I am doing wrong on this if I am the cause.
Hi @CKozanecki , thank you for raising this issue! making a quick initial pass here, I see that nested block
field in default_action
should be set with the config block syntax (ref: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl#default-action) e.g.
default_action {
block {}
}
hope this helps in the meantime!
Thanks @anGie44, that was a copy paste issue from source control, but I already fixed that one. I will update with what is on my server
sounds good! the other thing i'm noting in the example provided is that the resource needs a visibility_config
in addition to the one inside of the rule
block so something like
resource "aws_wafv2_web_acl" "wafacl" {
# other config
rule {
visibility_config {
...
}
}
visibility_config {
...
}
}
tho could be a copy paste issue as well?
Looks like that is the answer! There wasn't an example in the documentation for my type of statement, and I didnt notice that it requires one for the IAM and the RULE.
Thank you very much @anGie44 !
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!
Community Note
Terraform CLI and Terraform AWS Provider Version
`Terraform v0.13.5
Affected Resource(s)
aws_wafv2_web_acl byte_match_statement
Terraform Configuration Files
Expected Behavior
I have set every property and still get the same behavior. In the display, I don't have override_action because it didn't make a difference if it was there or not. No matter what i try this keeps giving the same error, but I would expect it would create a new waf rule.
Actual Behavior
`Error: Required attribute is not set
on waf/main.tf line 1, in resource "aws_wafv2_web_acl" "wafacl": 1: resource "aws_wafv2_web_acl" "wafacl" {`
Steps to Reproduce
terraform apply
References
pulling my information from https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl found a similar issue at https://github.com/hashicorp/terraform-provider-aws/issues/15576 that was closed by the author with no explanation of why
0000