-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
variables.tf
340 lines (285 loc) · 14.1 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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
variable "vpn_gateway_id" {
description = "The id of the VPN Gateway."
type = string
default = null
}
variable "transit_gateway_id" {
description = "The ID of the Transit Gateway."
type = string
default = null
}
variable "customer_gateway_id" {
description = "The id of the Customer Gateway."
type = string
}
variable "create_vpn_connection" {
description = "Set to false to prevent the creation of a VPN Connection."
type = bool
default = true
}
variable "vpc_id" {
description = "The id of the VPC where the VPN Gateway lives."
type = string
default = null
}
variable "vpc_subnet_route_table_ids" {
description = "The ids of the VPC subnets for which routes from the VPN Gateway will be propagated."
type = list(string)
default = []
}
# Workaround for limitation when using computed values in count attribute
# https://github.com/hashicorp/terraform/issues/10857
variable "vpc_subnet_route_table_count" {
description = "The number of subnet route table ids being passed in via `vpc_subnet_route_table_ids`."
type = number
default = 0
}
variable "tags" {
description = "Set of tags to be added to the VPN Connection resource (only if `create_vpn_connection = true`)."
type = map(string)
default = {}
}
variable "vpn_connection_static_routes_only" {
description = "Set to true for the created VPN connection to use static routes exclusively (only if `create_vpn_connection = true`). Static routes must be used for devices that don't support BGP."
type = bool
default = false
}
variable "vpn_connection_enable_acceleration" {
description = "Indicate whether to enable acceleration for the VPN connection. Supports only EC2 Transit Gateway."
type = bool
default = null
}
variable "vpn_connection_static_routes_destinations" {
description = "List of CIDRs to be used as destination for static routes (used with `vpn_connection_static_routes_only = true`). Routes to destinations set here will be propagated to the routing tables of the subnets defined in `vpc_subnet_route_table_ids`."
type = list(string)
default = []
}
variable "tunnel1_inside_cidr" {
description = "The CIDR block of the inside IP addresses for the first VPN tunnel."
type = string
default = ""
}
variable "tunnel2_inside_cidr" {
description = "The CIDR block of the inside IP addresses for the second VPN tunnel."
type = string
default = ""
}
variable "tunnel1_preshared_key" {
description = "The preshared key of the first VPN tunnel."
type = string
default = ""
sensitive = true
}
variable "tunnel2_preshared_key" {
description = "The preshared key of the second VPN tunnel."
type = string
default = ""
sensitive = true
}
# Attachment can be already managed by the terraform-aws-vpc module by using the enable_vpn_gateway variable
variable "create_vpn_gateway_attachment" {
description = "Set to false to prevent attachment of the VGW to the VPC"
type = bool
default = true
}
# Use terraform-aws-transit-gateway module to create TGW required resources and set `connect_to_transit_gateway = true` here
variable "connect_to_transit_gateway" {
description = "Set to false to disable attachment of the VPN connection route to the VPN connection (TGW uses another resource for that)"
type = bool
default = false
}
variable "tunnel1_phase1_dh_group_numbers" {
description = "(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24"
type = list(number)
default = null
}
variable "tunnel2_phase1_dh_group_numbers" {
description = "(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24"
type = list(number)
default = null
}
variable "tunnel1_phase1_encryption_algorithms" {
description = "(Optional) List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16"
type = list(string)
default = null
}
variable "tunnel2_phase1_encryption_algorithms" {
description = "(Optional) List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16"
type = list(string)
default = null
}
variable "tunnel1_phase1_integrity_algorithms" {
description = "(Optional) One or more integrity algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512"
type = list(string)
default = null
}
variable "tunnel2_phase1_integrity_algorithms" {
description = "(Optional) One or more integrity algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512"
type = list(string)
default = null
}
variable "tunnel1_phase1_lifetime_seconds" {
description = "(Optional, Default 28800) The lifetime for phase 1 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 28800"
type = number
default = null
}
variable "tunnel2_phase1_lifetime_seconds" {
description = "(Optional, Default 28800) The lifetime for phase 1 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 28800"
type = number
default = null
}
variable "tunnel1_dpd_timeout_seconds" {
description = "(Optional, Default 30) The number of seconds after which a DPD timeout occurs for the first VPN tunnel. Valid value is equal or higher than 30"
type = number
default = null
}
variable "tunnel2_dpd_timeout_seconds" {
description = "(Optional, Default 30) The number of seconds after which a DPD timeout occurs for the second VPN tunnel. Valid value is equal or higher than 30"
type = number
default = null
}
variable "tunnel1_dpd_timeout_action" {
description = "(Optional, Default clear) The action to take after DPD timeout occurs for the first VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are clear | none | restart"
type = string
default = null
}
variable "tunnel2_dpd_timeout_action" {
description = "(Optional, Default clear) The action to take after DPD timeout occurs for the second VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are clear | none | restart"
type = string
default = null
}
variable "tunnel1_phase2_dh_group_numbers" {
description = "(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24"
type = list(number)
default = null
}
variable "tunnel2_phase2_dh_group_numbers" {
description = "(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the second VPN tunnel for phase 2 IKE negotiations. Valid values are 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24"
type = list(number)
default = null
}
variable "tunnel1_phase2_encryption_algorithms" {
description = "(Optional) List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16"
type = list(string)
default = null
}
variable "tunnel2_phase2_encryption_algorithms" {
description = "(Optional) List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16"
type = list(string)
default = null
}
variable "tunnel1_phase2_integrity_algorithms" {
description = "(Optional) List of one or more integrity algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512"
type = list(string)
default = null
}
variable "tunnel2_phase2_integrity_algorithms" {
description = "(Optional) List of one or more integrity algorithms that are permitted for the second VPN tunnel for phase 2 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512"
type = list(string)
default = null
}
variable "tunnel1_phase2_lifetime_seconds" {
description = "(Optional, Default 3600) The lifetime for phase 2 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 3600"
type = number
default = null
}
variable "tunnel2_phase2_lifetime_seconds" {
description = "(Optional, Default 3600) The lifetime for phase 2 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 3600"
type = number
default = null
}
variable "tunnel1_rekey_fuzz_percentage" {
description = "(Optional, Default 100) The percentage of the rekey window for the first VPN tunnel (determined by tunnel1_rekey_margin_time_seconds) during which the rekey time is randomly selected. Valid value is between 0 and 100"
type = number
default = null
}
variable "tunnel2_rekey_fuzz_percentage" {
description = "(Optional, Default 100) The percentage of the rekey window for the second VPN tunnel (determined by tunnel1_rekey_margin_time_seconds) during which the rekey time is randomly selected. Valid value is between 0 and 100"
type = number
default = null
}
variable "tunnel1_rekey_margin_time_seconds" {
description = "(Optional, Default 540) The margin time, in seconds, before the phase 2 lifetime expires, during which the AWS side of the first VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for tunnel1_rekey_fuzz_percentage. Valid value is between 60 and half of tunnel1_phase2_lifetime_seconds"
type = number
default = null
}
variable "tunnel2_rekey_margin_time_seconds" {
description = "(Optional, Default 540) The margin time, in seconds, before the phase 2 lifetime expires, during which the AWS side of the second VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for tunnel2_rekey_fuzz_percentage. Valid value is between 60 and half of tunnel2_phase2_lifetime_seconds"
type = number
default = null
}
variable "tunnel1_replay_window_size" {
description = "(Optional, Default 1024) The number of packets in an IKE replay window for the first VPN tunnel. Valid value is between 64 and 2048."
type = number
default = null
}
variable "tunnel2_replay_window_size" {
description = "(Optional, Default 1024) The number of packets in an IKE replay window for the second VPN tunnel. Valid value is between 64 and 2048."
type = number
default = null
}
variable "tunnel1_startup_action" {
description = "(Optional, Default add) The action to take when the establishing the tunnel for the first VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are add | start"
type = string
default = null
}
variable "tunnel2_startup_action" {
description = "(Optional, Default add) The action to take when the establishing the tunnel for the second VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are add | start"
type = string
default = null
}
variable "tunnel1_ike_versions" {
description = "(Optional) The IKE versions that are permitted for the first VPN tunnel. Valid values are ikev1 | ikev2"
type = list(string)
default = null
}
variable "tunnel2_ike_versions" {
description = "(Optional) The IKE versions that are permitted for the second VPN tunnel. Valid values are ikev1 | ikev2"
type = list(string)
default = null
}
variable "tunnel1_log_options" {
description = "(Optional) Options for sending VPN tunnel logs to CloudWatch."
type = any
default = {}
}
variable "tunnel2_log_options" {
description = "(Optional) Options for sending VPN tunnel logs to CloudWatch."
type = any
default = {}
}
variable "tunnel_inside_ip_version" {
description = "(Optional) Indicate whether the VPN tunnels process IPv4 or IPv6 traffic. Valid values are ipv4 | ipv6. ipv6 Supports only EC2 Transit Gateway."
type = string
default = "ipv4"
}
variable "local_ipv4_network_cidr" {
description = "(Optional) The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection."
type = string
default = null
}
variable "remote_ipv4_network_cidr" {
description = "(Optional) The IPv4 CIDR on the AWS side of the VPN connection."
type = string
default = null
}
variable "local_ipv6_network_cidr" {
description = "(Optional) The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection."
type = string
default = null
}
variable "remote_ipv6_network_cidr" {
description = "(Optional) The IPv6 CIDR on AWS side of the VPN connection."
type = string
default = null
}
variable "tunnel1_enable_tunnel_lifecycle_control" {
description = "(Optional) Turn on or off tunnel endpoint lifecycle control feature for the first VPN tunnel. Valid values are true | false"
type = bool
default = null
}
variable "tunnel2_enable_tunnel_lifecycle_control" {
description = "(Optional) Turn on or off tunnel endpoint lifecycle control feature for the second VPN tunnel. Valid values are true | false"
type = bool
default = null
}