Creates a Web ACL with a managed rule group for common AWS rules and specific overrides.

Terraform Template

resource "aws_wafv2_web_acl" "example" {
  description = "Example of a managed rule."
  name = "managed-rule-example"

  rule {
    name = "rule-1"
    priority = 1

    visibility_config {
      cloudwatch_metrics_enabled = false
      metric_name = "friendly-rule-metric-name"
      sampled_requests_enabled = false
    }
  }
  scope = "REGIONAL"

  tags = {
    Tag1 = "Value1"
    Tag2 = "Value2"
  }

  visibility_config {
    cloudwatch_metrics_enabled = false
    metric_name = "friendly-metric-name"
    sampled_requests_enabled = false
  }
}