-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
Copy pathvariables.tf
547 lines (440 loc) · 16.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
variable "create_vpc" {
description = "Controls if VPC should be created (it affects almost all resources)"
default = true
}
variable "name" {
description = "Name to be used on all the resources as identifier"
default = ""
}
variable "cidr" {
description = "The CIDR block for the VPC. Default value is a valid CIDR, but not acceptable by AWS and should be overridden"
default = "0.0.0.0/0"
}
variable "assign_generated_ipv6_cidr_block" {
description = "Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block"
default = false
}
variable "secondary_cidr_blocks" {
description = "List of secondary CIDR blocks to associate with the VPC to extend the IP Address pool"
default = []
}
variable "instance_tenancy" {
description = "A tenancy option for instances launched into the VPC"
default = "default"
}
variable "public_subnet_suffix" {
description = "Suffix to append to public subnets name"
default = "public"
}
variable "private_subnet_suffix" {
description = "Suffix to append to private subnets name"
default = "private"
}
variable "intra_subnet_suffix" {
description = "Suffix to append to intra subnets name"
default = "intra"
}
variable "database_subnet_suffix" {
description = "Suffix to append to database subnets name"
default = "db"
}
variable "redshift_subnet_suffix" {
description = "Suffix to append to redshift subnets name"
default = "redshift"
}
variable "elasticache_subnet_suffix" {
description = "Suffix to append to elasticache subnets name"
default = "elasticache"
}
variable "public_subnets" {
description = "A list of public subnets inside the VPC"
default = []
}
variable "private_subnets" {
description = "A list of private subnets inside the VPC"
default = []
}
variable "database_subnets" {
type = "list"
description = "A list of database subnets"
default = []
}
variable "redshift_subnets" {
type = "list"
description = "A list of redshift subnets"
default = []
}
variable "elasticache_subnets" {
type = "list"
description = "A list of elasticache subnets"
default = []
}
variable "intra_subnets" {
type = "list"
description = "A list of intra subnets"
default = []
}
variable "create_database_subnet_route_table" {
description = "Controls if separate route table for database should be created"
default = false
}
variable "create_redshift_subnet_route_table" {
description = "Controls if separate route table for redshift should be created"
default = false
}
variable "create_elasticache_subnet_route_table" {
description = "Controls if separate route table for elasticache should be created"
default = false
}
variable "create_database_subnet_group" {
description = "Controls if database subnet group should be created"
default = true
}
variable "create_elasticache_subnet_group" {
description = "Controls if elasticache subnet group should be created"
default = true
}
variable "create_redshift_subnet_group" {
description = "Controls if redshift subnet group should be created"
default = true
}
variable "create_database_internet_gateway_route" {
description = "Controls if an internet gateway route for public database access should be created"
default = false
}
variable "create_database_nat_gateway_route" {
description = "Controls if a nat gateway route should be created to give internet access to the database subnets"
default = false
}
variable "azs" {
description = "A list of availability zones in the region"
default = []
}
variable "enable_dns_hostnames" {
description = "Should be true to enable DNS hostnames in the VPC"
default = false
}
variable "enable_dns_support" {
description = "Should be true to enable DNS support in the VPC"
default = true
}
variable "enable_nat_gateway" {
description = "Should be true if you want to provision NAT Gateways for each of your private networks"
default = false
}
variable "single_nat_gateway" {
description = "Should be true if you want to provision a single shared NAT Gateway across all of your private networks"
default = false
}
variable "one_nat_gateway_per_az" {
description = "Should be true if you want only one NAT Gateway per availability zone. Requires `var.azs` to be set, and the number of `public_subnets` created to be greater than or equal to the number of availability zones specified in `var.azs`."
default = false
}
variable "reuse_nat_ips" {
description = "Should be true if you don't want EIPs to be created for your NAT Gateways and will instead pass them in via the 'external_nat_ip_ids' variable"
default = false
}
variable "external_nat_ip_ids" {
description = "List of EIP IDs to be assigned to the NAT Gateways (used in combination with reuse_nat_ips)"
type = "list"
default = []
}
variable "enable_dynamodb_endpoint" {
description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
default = false
}
variable "enable_s3_endpoint" {
description = "Should be true if you want to provision an S3 endpoint to the VPC"
default = false
}
variable "enable_ssm_endpoint" {
description = "Should be true if you want to provision an SSM endpoint to the VPC"
default = false
}
variable "ssm_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for SSM endpoint"
default = []
}
variable "ssm_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for SSM endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used."
default = []
}
variable "ssm_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for SSM endpoint"
default = false
}
variable "enable_ssmmessages_endpoint" {
description = "Should be true if you want to provision a SSMMESSAGES endpoint to the VPC"
default = false
}
variable "ssmmessages_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for SSMMESSAGES endpoint"
default = []
}
variable "ssmmessages_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for SSMMESSAGES endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used."
default = []
}
variable "ssmmessages_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for SSMMESSAGES endpoint"
default = false
}
variable "enable_ec2_endpoint" {
description = "Should be true if you want to provision an EC2 endpoint to the VPC"
default = false
}
variable "ec2_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for EC2 endpoint"
default = []
}
variable "ec2_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for EC2 endpoint"
default = false
}
variable "ec2_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for EC2 endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used."
default = []
}
variable "enable_ec2messages_endpoint" {
description = "Should be true if you want to provision an EC2MESSAGES endpoint to the VPC"
default = false
}
variable "ec2messages_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for EC2MESSAGES endpoint"
default = []
}
variable "ec2messages_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for EC2MESSAGES endpoint"
default = false
}
variable "ec2messages_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for EC2MESSAGES endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used."
default = []
}
variable "enable_ecr_api_endpoint" {
description = "Should be true if you want to provision an ecr api endpoint to the VPC"
default = false
}
variable "ecr_api_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for ECR api endpoint. If omitted, private subnets will be used."
default = []
}
variable "ecr_api_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for ECR API endpoint"
default = false
}
variable "ecr_api_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for ECR API endpoint"
default = []
}
variable "enable_ecr_dkr_endpoint" {
description = "Should be true if you want to provision an ecr dkr endpoint to the VPC"
default = false
}
variable "ecr_dkr_endpoint_subnet_ids" {
description = "The ID of one or more subnets in which to create a network interface for ECR dkr endpoint. If omitted, private subnets will be used."
default = []
}
variable "ecr_dkr_endpoint_private_dns_enabled" {
description = "Whether or not to associate a private hosted zone with the specified VPC for ECR DKR endpoint"
default = false
}
variable "ecr_dkr_endpoint_security_group_ids" {
description = "The ID of one or more security groups to associate with the network interface for ECR DKR endpoint"
default = []
}
variable "map_public_ip_on_launch" {
description = "Should be false if you do not want to auto-assign public IP on launch"
default = true
}
variable "enable_vpn_gateway" {
description = "Should be true if you want to create a new VPN Gateway resource and attach it to the VPC"
default = false
}
variable "vpn_gateway_id" {
description = "ID of VPN Gateway to attach to the VPC"
default = ""
}
variable "amazon_side_asn" {
description = "The Autonomous System Number (ASN) for the Amazon side of the gateway. By default the virtual private gateway is created with the current default Amazon ASN."
default = "64512"
}
variable "propagate_private_route_tables_vgw" {
description = "Should be true if you want route table propagation"
default = false
}
variable "propagate_public_route_tables_vgw" {
description = "Should be true if you want route table propagation"
default = false
}
variable "tags" {
description = "A map of tags to add to all resources"
default = {}
}
variable "vpc_tags" {
description = "Additional tags for the VPC"
default = {}
}
variable "igw_tags" {
description = "Additional tags for the internet gateway"
default = {}
}
variable "public_subnet_tags" {
description = "Additional tags for the public subnets"
default = {}
}
variable "private_subnet_tags" {
description = "Additional tags for the private subnets"
default = {}
}
variable "public_route_table_tags" {
description = "Additional tags for the public route tables"
default = {}
}
variable "private_route_table_tags" {
description = "Additional tags for the private route tables"
default = {}
}
variable "database_route_table_tags" {
description = "Additional tags for the database route tables"
default = {}
}
variable "redshift_route_table_tags" {
description = "Additional tags for the redshift route tables"
default = {}
}
variable "elasticache_route_table_tags" {
description = "Additional tags for the elasticache route tables"
default = {}
}
variable "intra_route_table_tags" {
description = "Additional tags for the intra route tables"
default = {}
}
variable "database_subnet_tags" {
description = "Additional tags for the database subnets"
default = {}
}
variable "database_subnet_group_tags" {
description = "Additional tags for the database subnet group"
default = {}
}
variable "redshift_subnet_tags" {
description = "Additional tags for the redshift subnets"
default = {}
}
variable "redshift_subnet_group_tags" {
description = "Additional tags for the redshift subnet group"
default = {}
}
variable "elasticache_subnet_tags" {
description = "Additional tags for the elasticache subnets"
default = {}
}
variable "intra_subnet_tags" {
description = "Additional tags for the intra subnets"
default = {}
}
variable "public_acl_tags" {
description = "Additional tags for the public subnets network ACLs"
default = {}
}
variable "private_acl_tags" {
description = "Additional tags for the private subnets network ACLs"
default = {}
}
variable "intra_acl_tags" {
description = "Additional tags for the intra subnets network ACLs"
default = {}
}
variable "dhcp_options_tags" {
description = "Additional tags for the DHCP option set"
default = {}
}
variable "nat_gateway_tags" {
description = "Additional tags for the NAT gateways"
default = {}
}
variable "nat_eip_tags" {
description = "Additional tags for the NAT EIP"
default = {}
}
variable "vpn_gateway_tags" {
description = "Additional tags for the VPN gateway"
default = {}
}
variable "enable_dhcp_options" {
description = "Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type"
default = false
}
variable "dhcp_options_domain_name" {
description = "Specifies DNS name for DHCP options set"
default = ""
}
variable "dhcp_options_domain_name_servers" {
description = "Specify a list of DNS server addresses for DHCP options set, default to AWS provided"
type = "list"
default = ["AmazonProvidedDNS"]
}
variable "dhcp_options_ntp_servers" {
description = "Specify a list of NTP servers for DHCP options set"
type = "list"
default = []
}
variable "dhcp_options_netbios_name_servers" {
description = "Specify a list of netbios servers for DHCP options set"
type = "list"
default = []
}
variable "dhcp_options_netbios_node_type" {
description = "Specify netbios node_type for DHCP options set"
default = ""
}
variable "manage_default_vpc" {
description = "Should be true to adopt and manage Default VPC"
default = false
}
variable "default_vpc_name" {
description = "Name to be used on the Default VPC"
default = ""
}
variable "default_vpc_enable_dns_support" {
description = "Should be true to enable DNS support in the Default VPC"
default = true
}
variable "default_vpc_enable_dns_hostnames" {
description = "Should be true to enable DNS hostnames in the Default VPC"
default = false
}
variable "default_vpc_enable_classiclink" {
description = "Should be true to enable ClassicLink in the Default VPC"
default = false
}
variable "default_vpc_tags" {
description = "Additional tags for the Default VPC"
default = {}
}
variable "public_inbound_acls" {
description = "Public subnets inbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL inbound"]
}
variable "public_outbound_acls" {
description = "Public subnets outbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL outbound"]
}
variable "private_inbound_acls" {
description = "Private subnets inbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL inbound"]
}
variable "private_outbound_acls" {
description = "Private subnets outbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL outbound"]
}
variable "intra_inbound_acls" {
description = "Intra subnets inbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL inbound"]
}
variable "intra_outbound_acls" {
description = "Intra subnets outbound network ACLs"
default = ["100", "allow", 0, 0, "-1", "0.0.0.0/0", "Allow ALL outbound"]
}