Creates a simple AWS WAFv2 Rule Group with a single rule that allows requests from specified countries.

Terraform Template

resource "aws_wafv2_rule_group" "example" {
  capacity = 2
  name = "example-rule"

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

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

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