forked from aws-samples/aws-waf-firewall-manager-terraform
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0-variables_firewall.tf
289 lines (240 loc) · 7.32 KB
/
0-variables_firewall.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
#
# Copyright Amazon.com, Inc. and its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.
#
#------------Deployment
variable "master_region" {
type = string
description = "region for provider of master account"
default = "eu-west-1"
}
variable "application_region" {
type = string
description = "region for provider of application account (regional scope)"
default = "eu-west-1"
}
variable "create_global_fms_waf_policy" {
type = bool
description = "enable or disable the creation of AWS Firewall Manager WAF policy with GLOBAL scope"
default = true
}
variable "create_regional_fms_waf_policy" {
type = bool
description = "enable or disable the creation of AWS Firewall Manager WAF policy with REGIONAL scope"
default = true
}
variable "create_waf_geo_rule_group" {
type = bool
description = "enable or disable the creation of AWS WAF rule group with Geolocation (it is not part of AWS Firewall Manager Policy by default)"
default = false
}
variable "create_waf_regex_rule_group" {
type = bool
description = "enable or disable the creation of AWS WAF rule group with Regex pattern (it is not part of AWS Firewall Manager Policy by default)"
default = false
}
variable "create_waf_sqli_rule_group" {
type = bool
description = "enable or disable the creation of AWS WAF rule group with SQLi rule (it is not part of AWS Firewall Manager Policy by default)"
default = false
}
variable "create_waf_xss_rule_group" {
type = bool
description = "enable or disable the creation of AWS WAF rule group with XSS rule (it is not part of AWS Firewall Manager Policy by default)"
default = false
}
variable "create_waf_ip_rule_group" {
type = bool
description = "enable or disable the creation of AWS WAF rule group with IP set (it is not part of AWS Firewall Manager Policy by default)"
default = false
}
variable "logging_option" {
type = string
description = "variable that defines the logging resources to create"
default = "option1"
}
#------------Firewall manager - policies
variable "global_policy_name" {
type = string
description = "Name for WAF policy created by AWS Firewall manager"
default = "PoCCFrontPolicy_global"
}
variable "global_policy_exclude_resource_tags" {
type = bool
default = false
}
variable "global_policy_remediation_enabled" {
type = bool
description = "enable or disable auto remediation"
default = true
}
variable "global_policy_orgunit_list" {
type = list(string)
description = "org units to apply web acl"
default = [""]
}
variable "global_policy_resource_tags" {
type = any
description = "map of resource tags that aws firewall manager will check to associate web acl"
/* default = {
"AWS_WAF" = "Enabled",
"Environment" = "poc",
"Type" = "edge"
} */
default = {}
}
variable "global_policy_overrideCustomerWebACLAssociation" {
type = bool
description = "enable or disable override web acl association"
default = true
}
variable "global_policy_default_action" {
type = string
description = "Default action of WebACL: ALLOW or DENY"
default = "ALLOW"
}
variable "regional_policy_name" {
type = string
description = "Name for WAF policy created by AWS Firewall manager"
default = "ApplicationPoCPolicy"
}
variable "regional_policy_exclude_resource_tags" {
type = bool
default = false
}
variable "regional_policy_remediation_enabled" {
type = bool
description = "enable or disable auto remediation"
default = true
}
variable "regional_policy_orgunit_list" {
type = list(string)
description = "org units to apply web acl"
default = [""]
}
variable "regional_policy_resource_tags" {
type = any
description = "map of resource tags that aws firewall manager will check to associate web acl"
default = {}
}
variable "regional_policy_overrideCustomerWebACLAssociation" {
type = bool
description = "enable or disable override web acl association"
default = true
}
variable "regional_policy_default_action" {
type = string
description = "Default action of WebACL: ALLOW or DENY"
default = "ALLOW"
}
# ------------ AWS WAF Custom rules
variable "allow_lists_set" {
type = map(object({
ip_address_version = string
addresses = list(string)
}))
default = {
set1 = {
ip_address_version = "IPV4"
addresses = ["10.10.0.0/24"]
},
set2 = {
ip_address_version = "IPV6"
addresses = ["2001:db8:1234::/48"]
}
}
}
variable "block_lists_set" {
type = map(object({
ip_address_version = string
addresses = list(string)
}))
default = {
set1 = {
ip_address_version = "IPV4"
addresses = ["198.31.0.0/24", "1.1.1.1/32"]
},
set2 = {
ip_address_version = "IPV6"
addresses = ["2001:db8:a::/64"]
}
}
}
variable "waf_rule_geo_country_list" {
type = list(string)
description = "List of country codes to block with AWS WAF geolocation rule group"
default = ["KP"]
}
variable "HTTPPostLoginParam" {
type = string
description = "Enter the URI for a Login page to rate-limit IP addresses from login attemps."
default = "login"
}
#------------Firewall manager - logging
variable "kinesis_firehose_name" {
type = string
description = "name for kinesis firehose that is the aws waf logging destination"
default = "aws-waf-logs-test"
}
variable "kinesis_destination_s3_name" {
type = string
description = "name for s3 bucket that is the target of kinesis firehose"
default = "test-waf-logs-poc-s3"
}
variable "kinesis_prefix" {
type = string
description = "name for log prefix"
default = "waf-logs"
}
variable "s3_delivery_buffer_interval" {
type = number
default = 60
}
variable "s3_delivery_buffer_size" {
type = number
default = 5
}
variable "DataNodeEBSVolumeSize" {
type = number
description = "Volume side for ES Data Nodes"
default = 500
}
variable "ESConfigBucket" {
type = string
description = "Name for ES Config Bucket"
default = "waf-dash-ES-config-1111"
}
variable "ESUserEmail" {
type = string
description = "Name for ES Config Bucket"
default = "X@amazon.com"
}
variable "ES_SSH_tunnel_instance_type" {
type = string
description = "instance type of SSH instance tunnel"
default = "t3.micro"
}
variable "ES_SSH_tunnel_amid_id_regional" {
type = string
description = "instance type of SSH instance tunnel"
default = "ami-058b1b7fe545997ae"
}
variable "ES_SSH_tunnel_amid_id_global" {
type = string
description = "instance type of SSH instance tunnel"
default = "ami-01cc34ab2709337aa"
}
variable "ES_SSH_tunnel_key_name" {
type = string
description = "key pair name of SSH instance tunnel"
default = "kibana"
}
variable "ES_SSH_tunnel_allowed_CIDR" {
type = list(string)
description = "list of CIDR to allow access to SSH tunnel"
default = ["192.168.0.21/32"]
}