# Outputs ====================================================================== output "id" { description = "VPC ID" value = aws_vpc.this.id } output "arn" { description = "VPC ARN" value = aws_vpc.this.arn } output "cidr_block" { description = "Primary VPC CIDR block" value = aws_vpc.this.cidr_block } output "secondary_cidr_blocks" { description = "List of secondary CIDR blocks associated with the VPC" value = [for assoc in aws_vpc_ipv4_cidr_block_association.this : assoc.cidr_block] } output "public_subnet_ids" { description = "Map of public subnet logical key to subnet ID" value = { for k, v in aws_subnet.public : k => v.id } } output "private_subnet_ids" { description = "Map of private subnet logical key to subnet ID" value = { for k, v in aws_subnet.private : k => v.id } } output "isolated_subnet_ids" { description = "Map of isolated subnet logical key to subnet ID" value = { for k, v in aws_subnet.isolated : k => v.id } } output "public_subnet_arns" { description = "Map of public subnet logical key to subnet ARN" value = { for k, v in aws_subnet.public : k => v.arn } } output "private_subnet_arns" { description = "Map of private subnet logical key to subnet ARN" value = { for k, v in aws_subnet.private : k => v.arn } } output "isolated_subnet_arns" { description = "Map of isolated subnet logical key to subnet ARN" value = { for k, v in aws_subnet.isolated : k => v.arn } } output "public_subnet_id_list" { description = "Flat list of public subnet IDs" value = values({ for k, v in aws_subnet.public : k => v.id }) } output "private_subnet_id_list" { description = "Flat list of private subnet IDs" value = values({ for k, v in aws_subnet.private : k => v.id }) } output "isolated_subnet_id_list" { description = "Flat list of isolated subnet IDs" value = values({ for k, v in aws_subnet.isolated : k => v.id }) } output "public_subnet_arn_list" { description = "Flat list of public subnet ARNs" value = values({ for k, v in aws_subnet.public : k => v.arn }) } output "private_subnet_arn_list" { description = "Flat list of private subnet ARNs" value = values({ for k, v in aws_subnet.private : k => v.arn }) } output "isolated_subnet_arn_list" { description = "Flat list of isolated subnet ARNs" value = values({ for k, v in aws_subnet.isolated : k => v.arn }) } output "nat_gateway_ids" { description = "Map of NAT gateway key to NAT gateway ID" value = { for k, v in aws_nat_gateway.this : k => v.id } } output "internet_gateway_id" { description = "Internet gateway ID (null when no public subnets)" value = length(aws_internet_gateway.this) > 0 ? aws_internet_gateway.this["igw"].id : null } output "private_route_table_ids" { description = "Map of private subnet key to route table ID" value = { for k, v in aws_route_table.private : k => v.id } } output "isolated_route_table_ids" { description = "Map of isolated subnet key to route table ID" value = { for k, v in aws_route_table.isolated : k => v.id } } output "public_route_table_id" { description = "Public route table ID (null when no public subnets)" value = length(aws_route_table.public) > 0 ? aws_route_table.public["public"].id : null } output "tgw_attachment_id" { description = "TGW VPC attachment ID, null when transit_gateway_id is not set" value = length(aws_ec2_transit_gateway_vpc_attachment.this) > 0 ? aws_ec2_transit_gateway_vpc_attachment.this[0].id : null } output "tgw_attachment_arn" { description = "TGW VPC attachment ARN, null when transit_gateway_id is not set" value = length(aws_ec2_transit_gateway_vpc_attachment.this) > 0 ? aws_ec2_transit_gateway_vpc_attachment.this[0].arn : null }