PARALLAX

waf_condition

Create and delete WAF Conditions

Collection: community.aws

Full Name: community.aws.waf_condition

Synopsis

Create and delete WAF Conditions

Parameters

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
debug_botocore_endpoint_logsboolfalse
endpoint_urlstr
filterslist
namestryes
profilestr
purge_filtersboolfalse
regionstr
secret_keystr
session_tokenstr
statestrpresent
typestryes
validate_certsbooltrue
waf_regionalboolfalse

Example

yaml
- name: create WAF byte condition
  community.aws.waf_condition:
    name: my_byte_condition
    filters:
        - field_to_match: header
          position: STARTS_WITH
          target_string: Hello
          header: Content-type
    type: byte

- name: create WAF geo condition
  community.aws.waf_condition:
    name: my_geo_condition
    filters:
        - country: US
        - country: AU
        - country: AT
    type: geo

- name: create IP address condition
  community.aws.waf_condition:
    name: "{{ resource_prefix }}_ip_condition"
    filters:
        - ip_address: "10.0.0.0/8"
        - ip_address: "192.168.0.0/24"
    type: ip

- name: create WAF regex condition
  community.aws.waf_condition:
    name: my_regex_condition
    filters:
        - field_to_match: query_string
          regex_pattern:
            name: greetings
            regex_strings:
                - '[hH]ello'
                - '^Hi there'
                - '.*Good Day to You'
    type: regex

- name: create WAF size condition
  community.aws.waf_condition:
    name: my_size_condition
    filters:
        - field_to_match: query_string
          size: 300
          comparison: GT
    type: size

- name: create WAF sql injection condition
  community.aws.waf_condition:
    name: my_sql_condition
    filters:
        - field_to_match: query_string
          transformation: url_decode
    type: sql

- name: create WAF xss condition
  community.aws.waf_condition:
    name: my_xss_condition
    filters:
        - field_to_match: query_string
          transformation: url_decode
    type: xss
Search
    ↑ ↓ move↵ openesc close