This Terraform module can create typical resources needed for using WAF
module "waf_acl_rules" {
source = "github.com/flaconi/terraform-aws-waf-acl-rules"
waf_acl_name = "name"
waf_acl_default_action = "BLOCK"
waf_rules = local.waf_rules
waf_rules = [{
name = "name"
priority = "1"
enabled = false
negated = false
action_type = "ALLOW"
byte_match_tuples = []
ranges = [
{
"value" = "127.0.0.1/32"
},
]
}, {
name = "blockgoogle"
priority = "2"
enabled = true
negated = true
action_type = "BLOCK"
byte_match_tuples = []
ranges = [
{
"value" = "8.8.4.4/32"
},
{
"value" = "8.8.8.8/32"
},
]
}
, {
name = "allowheaderx"
priority = "3"
enabled = true
negated = false
action_type = "ALLOW"
ranges = []
byte_match_tuples = [{
field_to_match_data = "header-X",
target_string = "containsthis"
}]
}
]
}
No modules.
Name |
Description |
Type |
Default |
Required |
waf_rules |
Waf Rules |
list(object({ name = string enabled = bool priority = string negated = bool action_type = string ranges = list(map(string)) byte_match_tuples = list(map(string)) uri_match = list(map(string)) })) |
[] |
no |
waf_acl_name |
Waf Rules |
string |
n/a |
yes |
waf_acl_default_action |
WAF Default Action |
string |
n/a |
yes |
MIT
Copyright (c) 2019 Flaconi GmbH