-
Notifications
You must be signed in to change notification settings - Fork 1
/
outputs.tf
32 lines (26 loc) · 979 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
output "vpc_id" {
value = local.vpc_id
description = "The VPC ID."
}
output "subnets" {
value = {
private = {
for az, subnet in aws_subnet.private : subnet.id => {
ipv4_cidr_block = subnet.cidr_block
availability_zone = az
route_table_id = try(aws_route_table.private[az].id, aws_route_table.private["private"].id)
}
}
public = module.public_infra.subnets
}
description = "Map of both private & public subnets with IP CIDR block, associated route table & network ACL IDs as properties."
}
output "private_subnet_addresses" {
value = local.custom_subnetting ? var.subnets.private : module.subnet_addresses.private_subnet_addresses
}
output "public_subnet_addresses" {
value = local.custom_subnetting ? var.subnets.public : module.subnet_addresses.public_subnet_addresses
}
output "unused_subnet_addresses" {
value = local.custom_subnetting ? null : module.subnet_addresses.unused_subnet_addresses
}