waf_condition
Create and delete WAF Conditions
Collection: community.aws
Full Name: community.aws.waf_condition
Synopsis
Create and delete WAF Conditions
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| debug_botocore_endpoint_logs | bool | false | ||
| endpoint_url | str | |||
| filters | list | |||
| name | str | yes | ||
| profile | str | |||
| purge_filters | bool | false | ||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | present | ||
| type | str | yes | ||
| validate_certs | bool | true | ||
| waf_regional | bool | false |
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