This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
forked from terraform-aws-modules/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
297 lines (241 loc) · 9.63 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
# VPC
output "vpc_id" {
description = "The ID of the VPC"
value = "${element(concat(aws_vpc.this.*.id, list("")), 0)}"
}
output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = "${element(concat(aws_vpc.this.*.cidr_block, list("")), 0)}"
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = "${element(concat(aws_vpc.this.*.default_security_group_id, list("")), 0)}"
}
output "default_network_acl_id" {
description = "The ID of the default network ACL"
value = "${element(concat(aws_vpc.this.*.default_network_acl_id, list("")), 0)}"
}
output "default_route_table_id" {
description = "The ID of the default route table"
value = "${element(concat(aws_vpc.this.*.default_route_table_id, list("")), 0)}"
}
output "vpc_instance_tenancy" {
description = "Tenancy of instances spin up within VPC"
value = "${element(concat(aws_vpc.this.*.instance_tenancy, list("")), 0)}"
}
output "vpc_enable_dns_support" {
description = "Whether or not the VPC has DNS support"
value = "${element(concat(aws_vpc.this.*.enable_dns_support, list("")), 0)}"
}
output "vpc_enable_dns_hostnames" {
description = "Whether or not the VPC has DNS hostname support"
value = "${element(concat(aws_vpc.this.*.enable_dns_hostnames, list("")), 0)}"
}
//output "vpc_enable_classiclink" {
// description = "Whether or not the VPC has Classiclink enabled"
// value = "${element(concat(aws_vpc.this.*.enable_classiclink, list("")), 0)}"
//}
output "vpc_main_route_table_id" {
description = "The ID of the main route table associated with this VPC"
value = "${element(concat(aws_vpc.this.*.main_route_table_id, list("")), 0)}"
}
//output "vpc_ipv6_association_id" {
// description = "The association ID for the IPv6 CIDR block"
// value = "${element(concat(aws_vpc.this.*.ipv6_association_id, list("")), 0)}"
//}
//
//output "vpc_ipv6_cidr_block" {
// description = "The IPv6 CIDR block"
// value = "${element(concat(aws_vpc.this.*.ipv6_cidr_block, list("")), 0)}"
//}
# Subnets
output "private_subnets" {
description = "List of IDs of private subnets"
value = ["${aws_subnet.private.*.id}"]
}
output "private_subnets_cidr_blocks" {
description = "List of cidr_blocks of private subnets"
value = ["${aws_subnet.private.*.cidr_block}"]
}
output "private_subnets_azs" {
description = "List of availability zones of private subnets"
value = ["${aws_subnet.private.*.availability_zone}"]
}
output "public_subnets" {
description = "List of IDs of public subnets"
value = ["${aws_subnet.public.*.id}"]
}
output "public_subnets_cidr_blocks" {
description = "List of cidr_blocks of public subnets"
value = ["${aws_subnet.public.*.cidr_block}"]
}
output "public_subnets_azs" {
description = "List of availability zones of public subnets"
value = ["${aws_subnet.public.*.availability_zone}"]
}
output "database_subnets" {
description = "List of IDs of database subnets"
value = ["${aws_subnet.database.*.id}"]
}
output "database_subnets_cidr_blocks" {
description = "List of cidr_blocks of database subnets"
value = ["${aws_subnet.database.*.cidr_block}"]
}
output "database_subnets_azs" {
description = "List of availability zones of database subnets"
value = ["${aws_subnet.database.*.availability_zone}"]
}
output "database_subnet_group" {
description = "ID of database subnet group"
value = "${element(concat(aws_db_subnet_group.database.*.id, list("")), 0)}"
}
output "redshift_subnets" {
description = "List of IDs of redshift subnets"
value = ["${aws_subnet.redshift.*.id}"]
}
output "redshift_subnets_cidr_blocks" {
description = "List of cidr_blocks of redshift subnets"
value = ["${aws_subnet.redshift.*.cidr_block}"]
}
output "redshift_subnets_azs" {
description = "List of availability zones of redshift subnets"
value = ["${aws_subnet.redshift.*.availability_zone}"]
}
output "redshift_subnet_group" {
description = "ID of redshift subnet group"
value = "${element(concat(aws_redshift_subnet_group.redshift.*.id, list("")), 0)}"
}
output "elasticache_subnets" {
description = "List of IDs of elasticache subnets"
value = ["${aws_subnet.elasticache.*.id}"]
}
output "elasticache_subnets_cidr_blocks" {
description = "List of cidr_blocks of elasticache subnets"
value = ["${aws_subnet.elasticache.*.cidr_block}"]
}
output "elasticache_subnets_azs" {
description = "List of availability zones of elasticache subnets"
value = ["${aws_subnet.elasticache.*.availability_zone}"]
}
output "elasticache_subnet_group" {
description = "ID of elasticache subnet group"
value = "${element(concat(aws_elasticache_subnet_group.elasticache.*.id, list("")), 0)}"
}
output "elasticache_subnet_group_name" {
description = "Name of elasticache subnet group"
value = "${element(concat(aws_elasticache_subnet_group.elasticache.*.name, list("")), 0)}"
}
output "intra_subnets" {
description = "List of IDs of intra subnets"
value = ["${aws_subnet.intra.*.id}"]
}
output "intra_subnets_cidr_blocks" {
description = "List of cidr_blocks of intra subnets"
value = ["${aws_subnet.intra.*.cidr_block}"]
}
output "intra_subnets_azs" {
description = "List of availability zones of intra subnets"
value = ["${aws_subnet.intra.*.availability_zone}"]
}
# Route tables
output "public_route_table_ids" {
description = "List of IDs of public route tables"
value = ["${aws_route_table.public.*.id}"]
}
output "private_route_table_ids" {
description = "List of IDs of private route tables"
value = ["${aws_route_table.private.*.id}"]
}
output "intra_route_table_ids" {
description = "List of IDs of intra route tables"
value = ["${aws_route_table.intra.*.id}"]
}
output "nat_ids" {
description = "List of allocation ID of Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nat.*.id}"]
}
output "nat_public_ips" {
description = "List of public Elastic IPs created for AWS NAT Gateway"
value = ["${aws_eip.nat.*.public_ip}"]
}
output "natgw_ids" {
description = "List of NAT Gateway IDs"
value = ["${aws_nat_gateway.this.*.id}"]
}
# Internet Gateway
output "igw_id" {
description = "The ID of the Internet Gateway"
value = "${element(concat(aws_internet_gateway.this.*.id, list("")), 0)}"
}
# VPC Endpoints
output "vpc_endpoint_s3_id" {
description = "The ID of VPC endpoint for S3"
value = "${element(concat(aws_vpc_endpoint.s3.*.id, list("")), 0)}"
}
output "vpc_endpoint_s3_pl_id" {
description = "The prefix list for the S3 VPC endpoint."
value = "${element(concat(aws_vpc_endpoint.s3.*.prefix_list_id, list("")), 0)}"
}
output "vpc_endpoint_dynamodb_id" {
description = "The ID of VPC endpoint for DynamoDB"
value = "${element(concat(aws_vpc_endpoint.dynamodb.*.id, list("")), 0)}"
}
# VPN Gateway
output "vgw_id" {
description = "The ID of the VPN Gateway"
value = "${element(concat(aws_vpn_gateway.this.*.id, aws_vpn_gateway_attachment.this.*.vpn_gateway_id, list("")), 0)}"
}
output "vpc_endpoint_dynamodb_pl_id" {
description = "The prefix list for the DynamoDB VPC endpoint."
value = "${element(concat(aws_vpc_endpoint.dynamodb.*.prefix_list_id, list("")), 0)}"
}
# Default VPC
output "default_vpc_id" {
description = "The ID of the VPC"
value = "${element(concat(aws_default_vpc.this.*.id, list("")), 0)}"
}
output "default_vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = "${element(concat(aws_default_vpc.this.*.cidr_block, list("")), 0)}"
}
output "default_vpc_default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = "${element(concat(aws_default_vpc.this.*.default_security_group_id, list("")), 0)}"
}
output "default_vpc_default_network_acl_id" {
description = "The ID of the default network ACL"
value = "${element(concat(aws_default_vpc.this.*.default_network_acl_id, list("")), 0)}"
}
output "default_vpc_default_route_table_id" {
description = "The ID of the default route table"
value = "${element(concat(aws_default_vpc.this.*.default_route_table_id, list("")), 0)}"
}
output "default_vpc_instance_tenancy" {
description = "Tenancy of instances spin up within VPC"
value = "${element(concat(aws_default_vpc.this.*.instance_tenancy, list("")), 0)}"
}
output "default_vpc_enable_dns_support" {
description = "Whether or not the VPC has DNS support"
value = "${element(concat(aws_default_vpc.this.*.enable_dns_support, list("")), 0)}"
}
output "default_vpc_enable_dns_hostnames" {
description = "Whether or not the VPC has DNS hostname support"
value = "${element(concat(aws_default_vpc.this.*.enable_dns_hostnames, list("")), 0)}"
}
//output "default_vpc_enable_classiclink" {
// description = "Whether or not the VPC has Classiclink enabled"
// value = "${element(concat(aws_default_vpc.this.*.enable_classiclink, list("")), 0)}"
//}
output "default_vpc_main_route_table_id" {
description = "The ID of the main route table associated with this VPC"
value = "${element(concat(aws_default_vpc.this.*.main_route_table_id, list("")), 0)}"
}
//output "default_vpc_ipv6_association_id" {
// description = "The association ID for the IPv6 CIDR block"
// value = "${element(concat(aws_default_vpc.this.*.ipv6_association_id, list("")), 0)}"
//}
//
//output "default_vpc_ipv6_cidr_block" {
// description = "The IPv6 CIDR block"
// value = "${element(concat(aws_default_vpc.this.*.ipv6_cidr_block, list("")), 0)}"
//}