-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
624 lines (498 loc) · 19.4 KB
/
outputs.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
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
################################################################################
# VPC
################################################################################
output "vpc_id" {
description = "The ID of the VPC"
value = module.vpc.vpc_id
}
output "vpc_arn" {
description = "The ARN of the VPC"
value = module.vpc.vpc_arn
}
output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = module.vpc.vpc_cidr_block
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = module.vpc.default_security_group_id
}
output "default_network_acl_id" {
description = "The ID of the default network ACL"
value = module.vpc.default_network_acl_id
}
output "default_route_table_id" {
description = "The ID of the default route table"
value = module.vpc.default_route_table_id
}
output "vpc_instance_tenancy" {
description = "Tenancy of instances spin up within VPC"
value = module.vpc.vpc_instance_tenancy
}
output "vpc_enable_dns_support" {
description = "Whether or not the VPC has DNS support"
value = module.vpc.vpc_enable_dns_support
}
output "vpc_enable_dns_hostnames" {
description = "Whether or not the VPC has DNS hostname support"
value = module.vpc.vpc_enable_dns_hostnames
}
output "vpc_main_route_table_id" {
description = "The ID of the main route table associated with this VPC"
value = module.vpc.vpc_main_route_table_id
}
output "vpc_ipv6_association_id" {
description = "The association ID for the IPv6 CIDR block"
value = module.vpc.vpc_ipv6_association_id
}
output "vpc_ipv6_cidr_block" {
description = "The IPv6 CIDR block"
value = module.vpc.vpc_ipv6_cidr_block
}
output "vpc_secondary_cidr_blocks" {
description = "List of secondary CIDR blocks of the VPC"
value = module.vpc.vpc_secondary_cidr_blocks
}
output "vpc_owner_id" {
description = "The ID of the AWS account that owns the VPC"
value = module.vpc.vpc_owner_id
}
################################################################################
# DHCP Options Set
################################################################################
output "dhcp_options_id" {
description = "The ID of the DHCP options"
value = module.vpc.dhcp_options_id
}
################################################################################
# Internet Gateway
################################################################################
output "igw_id" {
description = "The ID of the Internet Gateway"
value = module.vpc.igw_id
}
output "igw_arn" {
description = "The ARN of the Internet Gateway"
value = module.vpc.igw_arn
}
################################################################################
# Publiс Subnets
################################################################################
output "public_subnets" {
description = "List of IDs of public subnets"
value = module.vpc.public_subnets
}
output "public_subnet_arns" {
description = "List of ARNs of public subnets"
value = module.vpc.public_subnet_arns
}
output "public_subnets_cidr_blocks" {
description = "List of cidr_blocks of public subnets"
value = module.vpc.public_subnets_cidr_blocks
}
output "public_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC"
value = module.vpc.public_subnets_ipv6_cidr_blocks
}
output "public_route_table_ids" {
description = "List of IDs of public route tables"
value = module.vpc.public_route_table_ids
}
output "public_internet_gateway_route_id" {
description = "ID of the internet gateway route"
value = module.vpc.public_internet_gateway_route_id
}
output "public_internet_gateway_ipv6_route_id" {
description = "ID of the IPv6 internet gateway route"
value = module.vpc.public_internet_gateway_ipv6_route_id
}
output "public_route_table_association_ids" {
description = "List of IDs of the public route table association"
value = module.vpc.public_route_table_association_ids
}
output "public_network_acl_id" {
description = "ID of the public network ACL"
value = module.vpc.public_network_acl_id
}
output "public_network_acl_arn" {
description = "ARN of the public network ACL"
value = module.vpc.public_network_acl_arn
}
################################################################################
# Private Subnets
################################################################################
output "private_subnets" {
description = "List of IDs of private subnets"
value = module.vpc.private_subnets
}
output "private_subnet_arns" {
description = "List of ARNs of private subnets"
value = module.vpc.private_subnet_arns
}
output "private_subnets_cidr_blocks" {
description = "List of cidr_blocks of private subnets"
value = module.vpc.private_subnets_cidr_blocks
}
output "private_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of private subnets in an IPv6 enabled VPC"
value = module.vpc.private_subnets_ipv6_cidr_blocks
}
output "private_route_table_ids" {
description = "List of IDs of private route tables"
value = module.vpc.private_route_table_ids
}
output "private_nat_gateway_route_ids" {
description = "List of IDs of the private nat gateway route"
value = module.vpc.private_nat_gateway_route_ids
}
output "private_ipv6_egress_route_ids" {
description = "List of IDs of the ipv6 egress route"
value = module.vpc.private_ipv6_egress_route_ids
}
output "private_route_table_association_ids" {
description = "List of IDs of the private route table association"
value = module.vpc.private_route_table_association_ids
}
output "private_network_acl_id" {
description = "ID of the private network ACL"
value = module.vpc.private_network_acl_id
}
output "private_network_acl_arn" {
description = "ARN of the private network ACL"
value = module.vpc.private_network_acl_arn
}
################################################################################
# Outpost Subnets
################################################################################
output "outpost_subnets" {
description = "List of IDs of outpost subnets"
value = module.vpc.outpost_subnets
}
output "outpost_subnet_arns" {
description = "List of ARNs of outpost subnets"
value = module.vpc.outpost_subnet_arns
}
output "outpost_subnets_cidr_blocks" {
description = "List of cidr_blocks of outpost subnets"
value = module.vpc.outpost_subnets_cidr_blocks
}
output "outpost_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of outpost subnets in an IPv6 enabled VPC"
value = module.vpc.outpost_subnets_ipv6_cidr_blocks
}
output "outpost_network_acl_id" {
description = "ID of the outpost network ACL"
value = module.vpc.outpost_network_acl_id
}
output "outpost_network_acl_arn" {
description = "ARN of the outpost network ACL"
value = module.vpc.outpost_network_acl_arn
}
################################################################################
# Database Subnets
################################################################################
output "database_subnets" {
description = "List of IDs of database subnets"
value = module.vpc.database_subnets
}
output "database_subnet_arns" {
description = "List of ARNs of database subnets"
value = module.vpc.database_subnet_arns
}
output "database_subnets_cidr_blocks" {
description = "List of cidr_blocks of database subnets"
value = module.vpc.database_subnets_cidr_blocks
}
output "database_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of database subnets in an IPv6 enabled VPC"
value = module.vpc.database_subnets_ipv6_cidr_blocks
}
output "database_subnet_group" {
description = "ID of database subnet group"
value = module.vpc.database_subnet_group
}
output "database_subnet_group_name" {
description = "Name of database subnet group"
value = module.vpc.database_subnet_group_name
}
output "database_route_table_ids" {
description = "List of IDs of database route tables"
value = module.vpc.database_route_table_ids
}
output "database_internet_gateway_route_id" {
description = "ID of the database internet gateway route"
value = module.vpc.database_internet_gateway_route_id
}
output "database_nat_gateway_route_ids" {
description = "List of IDs of the database nat gateway route"
value = module.vpc.database_nat_gateway_route_ids
}
output "database_ipv6_egress_route_id" {
description = "ID of the database IPv6 egress route"
value = module.vpc.database_ipv6_egress_route_id
}
output "database_route_table_association_ids" {
description = "List of IDs of the database route table association"
value = module.vpc.database_route_table_association_ids
}
output "database_network_acl_id" {
description = "ID of the database network ACL"
value = module.vpc.database_network_acl_id
}
output "database_network_acl_arn" {
description = "ARN of the database network ACL"
value = module.vpc.database_network_acl_arn
}
################################################################################
# Redshift Subnets
################################################################################
output "redshift_subnets" {
description = "List of IDs of redshift subnets"
value = module.vpc.redshift_subnets
}
output "redshift_subnet_arns" {
description = "List of ARNs of redshift subnets"
value = module.vpc.redshift_subnet_arns
}
output "redshift_subnets_cidr_blocks" {
description = "List of cidr_blocks of redshift subnets"
value = module.vpc.redshift_subnets_cidr_blocks
}
output "redshift_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of redshift subnets in an IPv6 enabled VPC"
value = module.vpc.redshift_subnets_ipv6_cidr_blocks
}
output "redshift_subnet_group" {
description = "ID of redshift subnet group"
value = module.vpc.redshift_subnet_group
}
output "redshift_route_table_ids" {
description = "List of IDs of redshift route tables"
value = module.vpc.redshift_route_table_ids
}
output "redshift_route_table_association_ids" {
description = "List of IDs of the redshift route table association"
value = module.vpc.redshift_route_table_association_ids
}
output "redshift_public_route_table_association_ids" {
description = "List of IDs of the public redshift route table association"
value = module.vpc.redshift_public_route_table_association_ids
}
output "redshift_network_acl_id" {
description = "ID of the redshift network ACL"
value = module.vpc.redshift_network_acl_id
}
output "redshift_network_acl_arn" {
description = "ARN of the redshift network ACL"
value = module.vpc.redshift_network_acl_arn
}
################################################################################
# Elasticache Subnets
################################################################################
output "elasticache_subnets" {
description = "List of IDs of elasticache subnets"
value = module.vpc.elasticache_subnets
}
output "elasticache_subnet_arns" {
description = "List of ARNs of elasticache subnets"
value = module.vpc.elasticache_subnet_arns
}
output "elasticache_subnets_cidr_blocks" {
description = "List of cidr_blocks of elasticache subnets"
value = module.vpc.elasticache_subnets_cidr_blocks
}
output "elasticache_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of elasticache subnets in an IPv6 enabled VPC"
value = module.vpc.elasticache_subnets_ipv6_cidr_blocks
}
output "elasticache_subnet_group" {
description = "ID of elasticache subnet group"
value = module.vpc.elasticache_subnet_group
}
output "elasticache_subnet_group_name" {
description = "Name of elasticache subnet group"
value = module.vpc.elasticache_subnet_group_name
}
output "elasticache_route_table_ids" {
description = "List of IDs of elasticache route tables"
value = module.vpc.elasticache_route_table_ids
}
output "elasticache_route_table_association_ids" {
description = "List of IDs of the elasticache route table association"
value = module.vpc.elasticache_route_table_association_ids
}
output "elasticache_network_acl_id" {
description = "ID of the elasticache network ACL"
value = module.vpc.elasticache_network_acl_id
}
output "elasticache_network_acl_arn" {
description = "ARN of the elasticache network ACL"
value = module.vpc.elasticache_network_acl_arn
}
################################################################################
# Intra Subnets
################################################################################
output "intra_subnets" {
description = "List of IDs of intra subnets"
value = module.vpc.intra_subnets
}
output "intra_subnet_arns" {
description = "List of ARNs of intra subnets"
value = module.vpc.intra_subnet_arns
}
output "intra_subnets_cidr_blocks" {
description = "List of cidr_blocks of intra subnets"
value = module.vpc.intra_subnets_cidr_blocks
}
output "intra_subnets_ipv6_cidr_blocks" {
description = "List of IPv6 cidr_blocks of intra subnets in an IPv6 enabled VPC"
value = module.vpc.intra_subnets_ipv6_cidr_blocks
}
output "intra_route_table_ids" {
description = "List of IDs of intra route tables"
value = module.vpc.intra_route_table_ids
}
output "intra_route_table_association_ids" {
description = "List of IDs of the intra route table association"
value = module.vpc.intra_route_table_association_ids
}
output "intra_network_acl_id" {
description = "ID of the intra network ACL"
value = module.vpc.intra_network_acl_id
}
output "intra_network_acl_arn" {
description = "ARN of the intra network ACL"
value = module.vpc.intra_network_acl_arn
}
################################################################################
# NAT Gateway
################################################################################
output "nat_ids" {
description = "List of allocation ID of Elastic IPs created for AWS NAT Gateway"
value = module.vpc.nat_ids
}
output "nat_public_ips" {
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = module.vpc.nat_public_ips
}
output "natgw_ids" {
description = "List of NAT Gateway IDs"
value = module.vpc.natgw_ids
}
################################################################################
# Egress Only Gateway
################################################################################
output "egress_only_internet_gateway_id" {
description = "The ID of the egress only Internet Gateway"
value = module.vpc.egress_only_internet_gateway_id
}
################################################################################
# Customer Gateway
################################################################################
output "cgw_ids" {
description = "List of IDs of Customer Gateway"
value = module.vpc.cgw_ids
}
output "cgw_arns" {
description = "List of ARNs of Customer Gateway"
value = module.vpc.cgw_arns
}
output "this_customer_gateway" {
description = "Map of Customer Gateway attributes"
value = module.vpc.this_customer_gateway
}
################################################################################
# VPN Gateway
################################################################################
output "vgw_id" {
description = "The ID of the VPN Gateway"
value = module.vpc.vgw_id
}
output "vgw_arn" {
description = "The ARN of the VPN Gateway"
value = module.vpc.vgw_arn
}
################################################################################
# Default VPC
################################################################################
output "default_vpc_id" {
description = "The ID of the Default VPC"
value = module.vpc.default_vpc_id
}
output "default_vpc_arn" {
description = "The ARN of the Default VPC"
value = module.vpc.default_vpc_arn
}
output "default_vpc_cidr_block" {
description = "The CIDR block of the Default VPC"
value = module.vpc.default_vpc_cidr_block
}
output "default_vpc_default_security_group_id" {
description = "The ID of the security group created by default on Default VPC creation"
value = module.vpc.default_vpc_default_security_group_id
}
output "default_vpc_default_network_acl_id" {
description = "The ID of the default network ACL of the Default VPC"
value = module.vpc.default_vpc_default_network_acl_id
}
output "default_vpc_default_route_table_id" {
description = "The ID of the default route table of the Default VPC"
value = module.vpc.default_vpc_default_route_table_id
}
output "default_vpc_instance_tenancy" {
description = "Tenancy of instances spin up within Default VPC"
value = module.vpc.default_vpc_instance_tenancy
}
output "default_vpc_enable_dns_support" {
description = "Whether or not the Default VPC has DNS support"
value = module.vpc.default_vpc_enable_dns_support
}
output "default_vpc_enable_dns_hostnames" {
description = "Whether or not the Default VPC has DNS hostname support"
value = module.vpc.default_vpc_enable_dns_hostnames
}
output "default_vpc_main_route_table_id" {
description = "The ID of the main route table associated with the Default VPC"
value = module.vpc.default_vpc_main_route_table_id
}
################################################################################
# VPC Flow Log
################################################################################
output "vpc_flow_log_id" {
description = "The ID of the Flow Log resource"
value = module.vpc.vpc_flow_log_id
}
output "vpc_flow_log_destination_arn" {
description = "The ARN of the destination for VPC Flow Logs"
value = module.vpc.vpc_flow_log_destination_arn
}
output "vpc_flow_log_destination_type" {
description = "The type of the destination for VPC Flow Logs"
value = module.vpc.vpc_flow_log_destination_type
}
output "vpc_flow_log_cloudwatch_iam_role_arn" {
description = "The ARN of the IAM role used when pushing logs to Cloudwatch log group"
value = module.vpc.vpc_flow_log_cloudwatch_iam_role_arn
}
################################################################################
# VPC Endpoints
################################################################################
output "vpc_endpoints" {
description = "Array containing the full resource object and attributes for all endpoints created"
value = length(module.vpc_endpoints) > 0 ? module.vpc_endpoints[0].endpoints : null
}
output "reserved_ips_per_subnet" {
value = var.ip_offsets_per_subnet != null ? { for idx, subnet_id in module.vpc.private_subnets : subnet_id => local.reserved_ips_per_subnet[idx] } : null
description = "Map of subnet IDs to their reserved IP addresses in dotted decimal notation."
}
################################################################################
# Static values (arguments)
################################################################################
output "azs" {
description = "A list of availability zones in the region"
value = module.vpc.azs
}
output "name" {
description = "The name of the VPC specified as argument to this module"
value = module.vpc.name
}