generated from clowdhaus/terraform-aws-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathoutputs.tf
285 lines (227 loc) · 10 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
################################################################################
# VPC
################################################################################
output "arn" {
description = "Amazon Resource Name (ARN) of VPC"
value = try(aws_vpc.this[0].arn, null)
}
output "id" {
description = "The ID of the VPC"
value = local.vpc_id
}
output "main_route_table_id" {
description = "The ID of the main route table associated with this VPC. Note that you can change a VPC's main route table by using an `aws_main_route_table_association`"
value = try(aws_vpc.this[0].main_route_table_id, null)
}
output "ipv6_association_id" {
description = "The association ID for the IPv6 CIDR block"
value = try(aws_vpc.this[0].ipv6_association_id, null)
}
output "ipv6_cidr_block_network_border_group" {
description = "The Network Border Group Zone name"
value = try(aws_vpc.this[0].ipv6_cidr_block_network_border_group, null)
}
output "ipv4_cidr_block" {
description = "The IPv4 CIDR block of the VPC"
value = try(aws_vpc.this[0].cidr_block, null)
}
output "ipv6_cidr_block" {
description = "The IPv6 CIDR block of the VPC"
value = try(aws_vpc.this[0].ipv6_cidr_block, null)
}
output "owner_id" {
description = "The ID of the AWS account that owns the VPC"
value = try(aws_vpc.this[0].owner_id, null)
}
################################################################################
# VPC CIDR Block Association(s)
################################################################################
output "ipv4_cidr_block_associations" {
description = "Map of IPv4 CIDR block associations and their attributes"
value = aws_vpc_ipv4_cidr_block_association.this
}
output "ipv6_cidr_block_associations" {
description = "Map of IPv6 CIDR block associations and their attributes"
value = aws_vpc_ipv6_cidr_block_association.this
}
################################################################################
# Route53 Resolver
################################################################################
output "dnssec_config_arn" {
description = "The ARN for a configuration for DNSSEC validation"
value = try(aws_route53_resolver_dnssec_config.this[0].arn, null)
}
output "dnssec_config_id" {
description = "The ID for a configuration for DNSSEC validation"
value = try(aws_route53_resolver_dnssec_config.this[0].id, null)
}
output "dns_query_log_config_arn" {
description = "The ARN (Amazon Resource Name) of the Route 53 Resolver query logging configuration"
value = try(aws_route53_resolver_query_log_config.this[0].arn, null)
}
output "dns_query_log_config_id" {
description = "The ID of the Route 53 Resolver query logging configuration"
value = try(aws_route53_resolver_query_log_config.this[0].id, null)
}
output "dns_query_log_config_association_id" {
description = "he ID of the Route 53 Resolver query logging configuration association"
value = try(aws_route53_resolver_query_log_config_association.this[0].id, null)
}
################################################################################
# DNS Firewall Rule Group Association
################################################################################
output "dns_firewall_config_id" {
description = "The ID of the firewall configuration"
value = try(aws_route53_resolver_firewall_config.this[0].id, null)
}
output "dns_firewall_rule_group_associations" {
description = "Map of Route53 resolver firewall rule group associations and their attributes"
value = aws_route53_resolver_firewall_rule_group_association.this
}
################################################################################
# DHCP Options Set
################################################################################
output "dhcp_options_id" {
description = "The ID of the DHCP options set"
value = try(aws_vpc_dhcp_options.this[0].id, null)
}
output "dhcp_options_arn" {
description = "The ARN of the DHCP options set"
value = try(aws_vpc_dhcp_options.this[0].arn, null)
}
output "dhcp_options_association_id" {
description = "The ID of the DHCP Options set association"
value = try(aws_vpc_dhcp_options_association.this[0].id, null)
}
################################################################################
# Internet Gateway
################################################################################
output "internet_gateway_id" {
description = "The ID of the Internet Gateway"
value = try(aws_internet_gateway.this[0].id, null)
}
output "internet_gateway_arn" {
description = "The ARN of the Internet Gateway"
value = try(aws_internet_gateway.this[0].arn, null)
}
output "egress_only_internet_gateway_id" {
description = "The ID of the Egress-Only Internet Gateway"
value = try(aws_egress_only_internet_gateway.this[0].id, null)
}
################################################################################
# Customer Gateway(s)
################################################################################
output "customer_gateways" {
description = "Map of Customer Gateways and their attributes"
value = aws_customer_gateway.this
}
output "customer_gateway_ids" {
description = "List of Customer Gateway IDs"
value = [for cgw in aws_customer_gateway.this : cgw.id]
}
output "customer_gateway_arns" {
description = "List of Customer Gateways ARNs"
value = [for cgw in aws_customer_gateway.this : cgw.arn]
}
################################################################################
# VPN Gateway(s)
################################################################################
output "vpn_gateways" {
description = "Map of VPN Gateways and their attributes"
value = aws_vpn_gateway.this
}
output "vpn_gateway_ids" {
description = "List of VPN Gateway IDs"
value = [for vgw in aws_vpn_gateway.this : vgw.id]
}
output "vpn_gateway_arns" {
description = "List of VPN Gateways ARNs"
value = [for vgw in aws_vpn_gateway.this : vgw.arn]
}
################################################################################
# VPC Default Security Group
################################################################################
output "default_security_group_arn" {
description = "The ARN of the security group created by default on VPC creation"
value = try(aws_default_security_group.this[0].arn, null)
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = try(aws_vpc.this[0].default_security_group_id, aws_default_security_group.this[0].id, null)
}
################################################################################
# VPC Default Network ACL
################################################################################
output "default_network_acl_arn" {
description = "ARN of the Default Network ACL"
value = try(aws_default_network_acl.this[0].arn, null)
}
output "default_network_acl_id" {
description = "ID of the Default Network ACL"
value = try(aws_vpc.this[0].default_network_acl_id, aws_default_network_acl.this[0].id, null)
}
################################################################################
# VPC Default Route Table
################################################################################
output "default_route_table_arn" {
description = "ARN of the default route table"
value = try(aws_default_route_table.this[0].arn, null)
}
output "default_route_table_id" {
description = "ID of the default route table"
value = try(aws_vpc.this[0].default_route_table_id, aws_default_route_table.this[0].id, null)
}
################################################################################
# Account Default DHCP Options
################################################################################
output "default_dhcp_options_id" {
description = "The ID of the default DHCP options set"
value = try(aws_default_vpc_dhcp_options.this[0].id, null)
}
output "default_dhcp_options_arn" {
description = "The ARN of the default DHCP options set"
value = try(aws_default_vpc_dhcp_options.this[0].arn, null)
}
################################################################################
# Account Default VPC
################################################################################
output "default_vpc_id" {
description = "The ID of the Default VPC"
value = try(aws_default_vpc.this[0].id, null)
}
output "default_vpc_arn" {
description = "The ARN of the Default VPC"
value = try(aws_default_vpc.this[0].arn, null)
}
output "default_vpc_ipv4_cidr_block" {
description = "The CIDR block of the Default VPC"
value = try(aws_default_vpc.this[0].cidr_block, null)
}
output "default_vpc_default_security_group_id" {
description = "The ID of the security group created by default on Default VPC creation"
value = try(aws_default_vpc.this[0].default_security_group_id, null)
}
output "default_vpc_default_network_acl_id" {
description = "The ID of the default network ACL of the Default VPC"
value = try(aws_default_vpc.this[0].default_network_acl_id, null)
}
output "default_vpc_default_route_table_id" {
description = "The ID of the default route table of the Default VPC"
value = try(aws_default_vpc.this[0].default_route_table_id, null)
}
output "default_vpc_instance_tenancy" {
description = "Tenancy of instances spin up within Default VPC"
value = try(aws_default_vpc.this[0].instance_tenancy, null)
}
output "default_vpc_enable_dns_support" {
description = "Whether or not the Default VPC has DNS support"
value = try(aws_default_vpc.this[0].enable_dns_support, null)
}
output "default_vpc_enable_dns_hostnames" {
description = "Whether or not the Default VPC has DNS hostname support"
value = try(aws_default_vpc.this[0].enable_dns_hostnames, null)
}
output "default_vpc_main_route_table_id" {
description = "The ID of the main route table associated with the Default VPC"
value = try(aws_default_vpc.this[0].main_route_table_id, null)
}