-
-
Notifications
You must be signed in to change notification settings - Fork 675
/
variables.tf
299 lines (248 loc) · 10.5 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
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
290
291
292
293
294
295
296
297
298
299
variable "create" {
description = "Controls if resources should be created (affects nearly all resources)"
type = bool
default = true
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
################################################################################
# Load Balancer
################################################################################
variable "access_logs" {
description = "Map containing access logging configuration for load balancer"
type = map(string)
default = {}
}
variable "connection_logs" {
description = "Map containing access logging configuration for load balancer"
type = map(string)
default = {}
}
variable "client_keep_alive" {
description = "Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds."
type = number
default = null
}
variable "customer_owned_ipv4_pool" {
description = "The ID of the customer owned ipv4 pool to use for this load balancer"
type = string
default = null
}
variable "desync_mitigation_mode" {
description = "Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`"
type = string
default = null
}
variable "dns_record_client_routing_policy" {
description = "Indicates how traffic is distributed among the load balancer Availability Zones. Possible values are any_availability_zone (default), availability_zone_affinity, or partial_availability_zone_affinity. Only valid for network type load balancers."
type = string
default = null
}
variable "drop_invalid_header_fields" {
description = "Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (`true`) or routed to targets (`false`). The default is `true`. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`"
type = bool
default = true
}
variable "enable_cross_zone_load_balancing" {
description = "If `true`, cross-zone load balancing of the load balancer will be enabled. For application load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `true`"
type = bool
default = true
}
variable "enable_deletion_protection" {
description = "If `true`, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to `true`"
type = bool
default = true
}
variable "enable_http2" {
description = "Indicates whether HTTP/2 is enabled in application load balancers. Defaults to `true`"
type = bool
default = null
}
variable "enable_tls_version_and_cipher_suite_headers" {
description = "Indicates whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false`"
type = bool
default = null
}
variable "enable_waf_fail_open" {
description = "Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`"
type = bool
default = null
}
variable "enable_xff_client_port" {
description = "Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`"
type = bool
default = null
}
variable "enable_zonal_shift" {
description = "Whether zonal shift is enabled"
type = bool
default = null
}
variable "idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: `60`"
type = number
default = null
}
variable "internal" {
description = "If true, the LB will be internal. Defaults to `false`"
type = bool
default = null
}
variable "ip_address_type" {
description = "The type of IP addresses used by the subnets for your load balancer. The possible values are `ipv4` and `dualstack`"
type = string
default = null
}
variable "load_balancer_type" {
description = "The type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`"
type = string
default = "application"
}
variable "enforce_security_group_inbound_rules_on_private_link_traffic" {
description = "Indicates whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type network. The possible values are on and off."
type = string
default = null
}
variable "name" {
description = "The name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen"
type = string
default = null
}
variable "name_prefix" {
description = "Creates a unique name beginning with the specified prefix. Conflicts with `name`"
type = string
default = null
}
variable "preserve_host_header" {
description = "Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`"
type = bool
default = null
}
variable "security_groups" {
description = "A list of security group IDs to assign to the LB"
type = list(string)
default = []
}
variable "subnet_mapping" {
description = "A list of subnet mapping blocks describing subnets to attach to load balancer"
type = list(map(string))
default = []
}
variable "subnets" {
description = "A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type `network`. Changing this value for load balancers of type `network` will force a recreation of the resource"
type = list(string)
default = null
}
variable "xff_header_processing_mode" {
description = "Determines how the load balancer modifies the X-Forwarded-For header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`"
type = string
default = null
}
variable "timeouts" {
description = "Create, update, and delete timeout configurations for the load balancer"
type = map(string)
default = {}
}
################################################################################
# Listener(s)
################################################################################
variable "default_port" {
description = "Default port used across the listener and target group"
type = number
default = 80
}
variable "default_protocol" {
description = "Default protocol used across the listener and target group"
type = string
default = "HTTP"
}
variable "listeners" {
description = "Map of listener configurations to create"
type = any
default = {}
}
################################################################################
# Target Group
################################################################################
variable "target_groups" {
description = "Map of target group configurations to create"
type = any
default = {}
}
variable "additional_target_group_attachments" {
description = "Map of additional target group attachments to create. Use `target_group_key` to attach to the target group created in `target_groups`"
type = any
default = {}
}
################################################################################
# Security Group
################################################################################
variable "create_security_group" {
description = "Determines if a security group is created"
type = bool
default = true
}
variable "security_group_name" {
description = "Name to use on security group created"
type = string
default = null
}
variable "security_group_use_name_prefix" {
description = "Determines whether the security group name (`security_group_name`) is used as a prefix"
type = bool
default = true
}
variable "security_group_description" {
description = "Description of the security group created"
type = string
default = null
}
variable "vpc_id" {
description = "Identifier of the VPC where the security group will be created"
type = string
default = null
}
variable "security_group_ingress_rules" {
description = "Security group ingress rules to add to the security group created"
type = any
default = {}
}
variable "security_group_egress_rules" {
description = "Security group egress rules to add to the security group created"
type = any
default = {}
}
variable "security_group_tags" {
description = "A map of additional tags to add to the security group created"
type = map(string)
default = {}
}
################################################################################
# Route53 Record(s)
################################################################################
variable "route53_records" {
description = "Map of Route53 records to create. Each record map should contain `zone_id`, `name`, and `type`"
type = any
default = {}
}
################################################################################
# WAF
################################################################################
variable "associate_web_acl" {
description = "Indicates whether a Web Application Firewall (WAF) ACL should be associated with the load balancer"
type = bool
default = false
}
variable "web_acl_arn" {
description = "Web Application Firewall (WAF) ARN of the resource to associate with the load balancer"
type = string
default = null
}
variable "putin_khuylo" {
description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
type = bool
default = true
}