Skip to content

Commit

Permalink
Fix collections and add vpc_arn back
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Alavi committed May 16, 2019
1 parent eb26605 commit 5efca3b
Showing 1 changed file with 28 additions and 38 deletions.
66 changes: 28 additions & 38 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ output "vpc_id" {
value = element(concat(aws_vpc.this.*.id, [""]), 0)
}

output "vpc_arn" {
description = "The ID of the VPC"
value = element(concat(aws_vpc.this.*.arn, [""]), 0)
}

output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = element(concat(aws_vpc.this.*.cidr_block, [""]), 0)
Expand Down Expand Up @@ -38,59 +43,44 @@ output "vpc_enable_dns_hostnames" {
value = element(concat(aws_vpc.this.*.enable_dns_hostnames, [""]), 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, [""]), 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)}"
//}

output "vpc_secondary_cidr_blocks" {
description = "List of secondary CIDR blocks of the VPC"
value = [aws_vpc_ipv4_cidr_block_association.this.*.cidr_block]
value = aws_vpc_ipv4_cidr_block_association.this.*.cidr_block
}

output "private_subnets" {
description = "List of IDs of private subnets"
value = [aws_subnet.private.*.id]
value = aws_subnet.private.*.id
}

output "private_subnets_cidr_blocks" {
description = "List of cidr_blocks of private subnets"
value = [aws_subnet.private.*.cidr_block]
value = aws_subnet.private.*.cidr_block
}

output "public_subnets" {
description = "List of IDs of public subnets"
value = [aws_subnet.public.*.id]
value = aws_subnet.public.*.id
}

output "public_subnets_cidr_blocks" {
description = "List of cidr_blocks of public subnets"
value = [aws_subnet.public.*.cidr_block]
value = aws_subnet.public.*.cidr_block
}

output "database_subnets" {
description = "List of IDs of database subnets"
value = [aws_subnet.database.*.id]
value = aws_subnet.database.*.id
}

output "database_subnets_cidr_blocks" {
description = "List of cidr_blocks of database subnets"
value = [aws_subnet.database.*.cidr_block]
value = aws_subnet.database.*.cidr_block
}

output "database_subnet_group" {
Expand All @@ -100,12 +90,12 @@ output "database_subnet_group" {

output "redshift_subnets" {
description = "List of IDs of redshift subnets"
value = [aws_subnet.redshift.*.id]
value = aws_subnet.redshift.*.id
}

output "redshift_subnets_cidr_blocks" {
description = "List of cidr_blocks of redshift subnets"
value = [aws_subnet.redshift.*.cidr_block]
value = aws_subnet.redshift.*.cidr_block
}

output "redshift_subnet_group" {
Expand All @@ -115,22 +105,22 @@ output "redshift_subnet_group" {

output "elasticache_subnets" {
description = "List of IDs of elasticache subnets"
value = [aws_subnet.elasticache.*.id]
value = aws_subnet.elasticache.*.id
}

output "elasticache_subnets_cidr_blocks" {
description = "List of cidr_blocks of elasticache subnets"
value = [aws_subnet.elasticache.*.cidr_block]
value = aws_subnet.elasticache.*.cidr_block
}

output "intra_subnets" {
description = "List of IDs of intra subnets"
value = [aws_subnet.intra.*.id]
value = aws_subnet.intra.*.id
}

output "intra_subnets_cidr_blocks" {
description = "List of cidr_blocks of intra subnets"
value = [aws_subnet.intra.*.cidr_block]
value = aws_subnet.intra.*.cidr_block
}

output "elasticache_subnet_group" {
Expand All @@ -151,50 +141,50 @@ output "elasticache_subnet_group_name" {

output "public_route_table_ids" {
description = "List of IDs of public route tables"
value = [aws_route_table.public.*.id]
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]
value = aws_route_table.private.*.id
}

output "database_route_table_ids" {
description = "List of IDs of database route tables"
value = [coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id)]
value = coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id)
}

output "redshift_route_table_ids" {
description = "List of IDs of redshift route tables"
value = [coalescelist(aws_route_table.redshift.*.id, aws_route_table.private.*.id)]
value = coalescelist(aws_route_table.redshift.*.id, aws_route_table.private.*.id)
}

output "elasticache_route_table_ids" {
description = "List of IDs of elasticache route tables"
value = [coalescelist(
value = coalescelist(
aws_route_table.elasticache.*.id,
aws_route_table.private.*.id,
)]
)
}

output "intra_route_table_ids" {
description = "List of IDs of intra route tables"
value = [aws_route_table.intra.*.id]
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]
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]
value = aws_eip.nat.*.public_ip
}

output "natgw_ids" {
description = "List of NAT Gateway IDs"
value = [aws_nat_gateway.this.*.id]
value = aws_nat_gateway.this.*.id
}

output "igw_id" {
Expand Down

0 comments on commit 5efca3b

Please sign in to comment.