terraform-aws-waf-webaclv2 icon indicating copy to clipboard operation
terraform-aws-waf-webaclv2 copied to clipboard

WAFv2 Multiple Conditions in the same rule

Open meirfine opened this issue 3 years ago • 1 comments

Hi all,

Thanks for sharing this module. I have a sort of question, I'm migrating my old WAFv1 rules to WAFv2 Rules and some of the rules have multiple conditions as I shown bellow,

rules = [ {
    name     = "URI_CONDITION"
    priority = 1
    action   = "block"

    and_statement = {
      statements = [ 
        {
             and_statment_condition_1
        },
        {
        or_statement = {
            statements  = [
              {
                    or_statment_condition_1
              },
              {
                    or_statment_condition_2
              }

            ]

         }
       }
      ]
    }
}]

another rule type but this time with not_statment & and_statment & or_statment

rule = [ {
    name     = "URI_CONDITION"
    priority = 1
    action   = "block"

    not_statment = {
       and_statement = {
          statements = [ 
          {
             and_statment_condition_1
          },
         {
          not_statment = {
            or_statement = {
               statements  = [
                {
                    or_statment_condition_1
                },
                {
                    or_statment_condition_2
                }
              ]
            }
          }
        }
      ]
    }
}]

Does the module support such a structure of rules?

AWS Supporting the above rules via awscli command (JSON structure).

Thanks

meirfine avatar May 22 '22 08:05 meirfine

I face same issue, see below error when apply: Screen Shot 2022-05-29 at 02 49 21

cloudboyd avatar May 28 '22 19:05 cloudboyd

@cloudboyd how were you able to fix your issue? I'm facing the same issue

drey143 avatar Oct 29 '22 01:10 drey143