-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
85 lines (77 loc) · 1.77 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
variable "scope" {
type = string
default = "regional"
description = <<EOT
Whether the WAF should be for a regional application or cloudfront
Note: if cloudfront provider must specify the us-east-1 region
EOT
validation {
condition = contains(["regional", "cloudfront"], var.scope)
error_message = "Allowed values: `regional`, `cloudfront`."
}
}
variable "waf_mode" {
type = string
default = "monitoring"
description = "Whether the WAF should be monitoring or active"
validation {
condition = contains(["monitoring", "active"], var.waf_mode)
error_message = "Allowed values: `monitoring`, `active`."
}
}
variable "managed_rules" {
type = object({
global_dos = bool
domestic_dos = bool
ip_reputation = bool
ip_blocklist = bool
common = bool
bad_inputs = bool
sqli = bool
unix = bool
linux = bool
windows = bool
php = bool
wordpress = bool
bot_control = bool
})
default = {
global_dos = true
domestic_dos = true
ip_reputation = true
ip_blocklist = false
common = true
bad_inputs = true
sqli = true
unix = true
linux = true
windows = false
php = false
wordpress = false
bot_control = false
}
}
variable "blocked_ips" {
type = object({
ipv4 = list(string)
ipv6 = list(string)
})
default = {
ipv4 = []
ipv6 = []
}
}
variable "dos_rate_limits" {
type = object({
domestic = number
global = number
})
default = {
domestic = 2000
global = 500
}
}
variable "common_rule_set_ignored_uri_regex" {
type = list(string)
default = ["^/admin.*"]
}