forked from cloudposse/terraform-aws-named-subnets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
36 lines (30 loc) · 897 Bytes
/
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
output "ngw_id" {
value = join("", aws_nat_gateway.default.*.id)
description = "NAT Gateway ID"
}
output "ngw_private_ip" {
value = join("", aws_nat_gateway.default.*.private_ip)
description = "Private IP address of the NAT Gateway"
}
output "ngw_public_ip" {
value = join("", aws_nat_gateway.default.*.public_ip)
description = "Public IP address of the NAT Gateway"
}
output "subnet_ids" {
value = coalescelist(aws_subnet.private.*.id, aws_subnet.public.*.id)
description = "Subnet IDs"
}
output "route_table_ids" {
value = coalescelist(aws_route_table.public.*.id, aws_route_table.private.*.id)
description = "Route table IDs"
}
output "named_subnet_ids" {
description = "Map of subnet names to subnet IDs"
value = zipmap(
var.subnet_names,
coalescelist(
aws_subnet.private.*.id,
aws_subnet.public.*.id
)
)
}