forked from terraform-aws-modules/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutputs.tf
155 lines (126 loc) · 4.51 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
# VPC
output "vpc_id" {
description = "The ID of the VPC"
value = "${aws_vpc.this.id}"
}
output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = "${aws_vpc.this.cidr_block}"
}
output "default_security_group_id" {
description = "The ID of the security group created by default on VPC creation"
value = "${aws_vpc.this.default_security_group_id}"
}
output "default_network_acl_id" {
description = "The ID of the default network ACL"
value = "${aws_vpc.this.default_network_acl_id}"
}
output "default_route_table_id" {
description = "The ID of the default route table"
value = "${aws_vpc.this.default_route_table_id}"
}
# 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 "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 "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_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_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_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)}"
}
# 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 "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, 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)}"
}