title: Error creating WAFv2 WebACL WAFInvalidParameterException
body: <pre><code>Error: Error creating WAFv2 WebACL: WAFInvalidParameterException: Error reason: You have used none or multiple values for a field that requires exactly one value., field: RULE_ACTION, parameter: RuleAction(block=null, allow=null, count=null)
  {
    RespMetadata: {
      StatusCode: 400,
      RequestID: &quot;24106754-b0db-4497-8e19-e72f8908dc19&quot;
    },
    Field: &quot;RULE_ACTION&quot;,
    Message_: &quot;Error reason: You have used none or multiple values for a field that requires exactly one value., field: RULE_ACTION, parameter: RuleAction(block=null, allow=null, count=null)&quot;,
    Parameter: &quot;RuleAction(block=null, allow=null, count=null)&quot;,
    Reason: &quot;You have used none or multiple values for a field that requires exactly one value.&quot;
  }
  
    on .terraform/modules/wafv2/main.tf line 18, in resource &quot;aws_wafv2_web_acl&quot; &quot;main&quot;:
    18: resource &quot;aws_wafv2_web_acl&quot; &quot;main&quot; {
  </code></pre>
  <p>I am having this error while trying to deploy a WAFV2 with terraform any help is appreciated please.</p>
  <p>Here is a little portion of the WAFv2 code:</p>
  <pre><code>resource &quot;aws_wafv2_web_acl&quot; &quot;main&quot; {
    name        = var.name
    description = &quot;WAFv2 ACL for ${var.name}&quot;
  
    scope = var.scope
  
    default_action {
      allow {}
    }
  
    visibility_config {
      cloudwatch_metrics_enabled = true
      sampled_requests_enabled   = true
      metric_name                = var.name
    }
  
    dynamic &quot;rule&quot; {
      for_each = var.managed_rules
      content {
        name     = rule.value.name
        priority = rule.value.priority
  
        override_action {
          dynamic &quot;none&quot; {
            for_each = rule.value.override_action == &quot;none&quot; ? [1] : []
            content {}
          }
  </code></pre>
  <p>I am trying to figure out why the error is still reflecting maybe a problem with my WAFV2?</p>