Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule visibility_config required by wafv2_web_acl resource but terraform-aws-waf marks it as optional #92

Open
l3rady opened this issue Aug 9, 2024 · 0 comments
Labels
bug 🐛 An issue with the system

Comments

@l3rady
Copy link

l3rady commented Aug 9, 2024

Describe the Bug

When running this module I am getting this error:

│ Error: Insufficient visibility_config blocks
│ 
│   on .terraform/modules/terraform-aws-wafv2.wafv2/rules.tf line 412, in resource "aws_wafv2_web_acl" "default":
│  412:     content {
│ 
│ At least 1 "visibility_config" blocks are required.

Many of the statement rules variables mark the visibility_config block as optional: https://github.com/cloudposse/terraform-aws-waf/blob/main/variables.tf#L165

However the wafv2_web_acl requires it in the rule block: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_web_acl#rule-block

Expected Behavior

Either require the rule visibility_config to be required in variables or have the module populate it automatically based on the global visibility_config settings and provide a sensible metric name

Steps to Reproduce

Config any rules without providing a visibility_config block inside the rule.

Screenshots

No response

Environment

No response

Additional Context

No response

@l3rady l3rady added the bug 🐛 An issue with the system label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant