From 6316f201afaf7d1209a1391be118d8560957d052 Mon Sep 17 00:00:00 2001 From: Marc Chamberland Date: Wed, 4 Sep 2024 11:05:50 -0400 Subject: [PATCH] Add new outputs with the full subnet objects --- README.md | 7 +++++++ outputs.tf | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/README.md b/README.md index 9814ab2ee..95578effa 100644 --- a/README.md +++ b/README.md @@ -607,6 +607,7 @@ No modules. | [database\_subnet\_arns](#output\_database\_subnet\_arns) | List of ARNs of database subnets | | [database\_subnet\_group](#output\_database\_subnet\_group) | ID of database subnet group | | [database\_subnet\_group\_name](#output\_database\_subnet\_group\_name) | Name of database subnet group | +| [database\_subnet\_objects](#output\_database\_subnet\_objects) | A list of all database subnets, containing the full objects. | | [database\_subnets](#output\_database\_subnets) | List of IDs of database subnets | | [database\_subnets\_cidr\_blocks](#output\_database\_subnets\_cidr\_blocks) | List of cidr\_blocks of database subnets | | [database\_subnets\_ipv6\_cidr\_blocks](#output\_database\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of database subnets in an IPv6 enabled VPC | @@ -632,6 +633,7 @@ No modules. | [elasticache\_subnet\_arns](#output\_elasticache\_subnet\_arns) | List of ARNs of elasticache subnets | | [elasticache\_subnet\_group](#output\_elasticache\_subnet\_group) | ID of elasticache subnet group | | [elasticache\_subnet\_group\_name](#output\_elasticache\_subnet\_group\_name) | Name of elasticache subnet group | +| [elasticache\_subnet\_objects](#output\_elasticache\_subnet\_objects) | A list of all elasticache subnets, containing the full objects. | | [elasticache\_subnets](#output\_elasticache\_subnets) | List of IDs of elasticache subnets | | [elasticache\_subnets\_cidr\_blocks](#output\_elasticache\_subnets\_cidr\_blocks) | List of cidr\_blocks of elasticache subnets | | [elasticache\_subnets\_ipv6\_cidr\_blocks](#output\_elasticache\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of elasticache subnets in an IPv6 enabled VPC | @@ -642,6 +644,7 @@ No modules. | [intra\_route\_table\_association\_ids](#output\_intra\_route\_table\_association\_ids) | List of IDs of the intra route table association | | [intra\_route\_table\_ids](#output\_intra\_route\_table\_ids) | List of IDs of intra route tables | | [intra\_subnet\_arns](#output\_intra\_subnet\_arns) | List of ARNs of intra subnets | +| [intra\_subnet\_objects](#output\_intra\_subnet\_objects) | A list of all intra subnets, containing the full objects. | | [intra\_subnets](#output\_intra\_subnets) | List of IDs of intra subnets | | [intra\_subnets\_cidr\_blocks](#output\_intra\_subnets\_cidr\_blocks) | List of cidr\_blocks of intra subnets | | [intra\_subnets\_ipv6\_cidr\_blocks](#output\_intra\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of intra subnets in an IPv6 enabled VPC | @@ -653,6 +656,7 @@ No modules. | [outpost\_network\_acl\_arn](#output\_outpost\_network\_acl\_arn) | ARN of the outpost network ACL | | [outpost\_network\_acl\_id](#output\_outpost\_network\_acl\_id) | ID of the outpost network ACL | | [outpost\_subnet\_arns](#output\_outpost\_subnet\_arns) | List of ARNs of outpost subnets | +| [outpost\_subnet\_objects](#output\_outpost\_subnet\_objects) | A list of all outpost subnets, containing the full objects. | | [outpost\_subnets](#output\_outpost\_subnets) | List of IDs of outpost subnets | | [outpost\_subnets\_cidr\_blocks](#output\_outpost\_subnets\_cidr\_blocks) | List of cidr\_blocks of outpost subnets | | [outpost\_subnets\_ipv6\_cidr\_blocks](#output\_outpost\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of outpost subnets in an IPv6 enabled VPC | @@ -663,6 +667,7 @@ No modules. | [private\_route\_table\_association\_ids](#output\_private\_route\_table\_association\_ids) | List of IDs of the private route table association | | [private\_route\_table\_ids](#output\_private\_route\_table\_ids) | List of IDs of private route tables | | [private\_subnet\_arns](#output\_private\_subnet\_arns) | List of ARNs of private subnets | +| [private\_subnet\_objects](#output\_private\_subnet\_objects) | A list of all private subnets, containing the full objects. | | [private\_subnets](#output\_private\_subnets) | List of IDs of private subnets | | [private\_subnets\_cidr\_blocks](#output\_private\_subnets\_cidr\_blocks) | List of cidr\_blocks of private subnets | | [private\_subnets\_ipv6\_cidr\_blocks](#output\_private\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of private subnets in an IPv6 enabled VPC | @@ -673,6 +678,7 @@ No modules. | [public\_route\_table\_association\_ids](#output\_public\_route\_table\_association\_ids) | List of IDs of the public route table association | | [public\_route\_table\_ids](#output\_public\_route\_table\_ids) | List of IDs of public route tables | | [public\_subnet\_arns](#output\_public\_subnet\_arns) | List of ARNs of public subnets | +| [public\_subnet\_objects](#output\_public\_subnet\_objects) | A list of all public subnets, containing the full objects. | | [public\_subnets](#output\_public\_subnets) | List of IDs of public subnets | | [public\_subnets\_cidr\_blocks](#output\_public\_subnets\_cidr\_blocks) | List of cidr\_blocks of public subnets | | [public\_subnets\_ipv6\_cidr\_blocks](#output\_public\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of public subnets in an IPv6 enabled VPC | @@ -683,6 +689,7 @@ No modules. | [redshift\_route\_table\_ids](#output\_redshift\_route\_table\_ids) | List of IDs of redshift route tables | | [redshift\_subnet\_arns](#output\_redshift\_subnet\_arns) | List of ARNs of redshift subnets | | [redshift\_subnet\_group](#output\_redshift\_subnet\_group) | ID of redshift subnet group | +| [redshift\_subnet\_objects](#output\_redshift\_subnet\_objects) | A list of all redshift subnets, containing the full objects. | | [redshift\_subnets](#output\_redshift\_subnets) | List of IDs of redshift subnets | | [redshift\_subnets\_cidr\_blocks](#output\_redshift\_subnets\_cidr\_blocks) | List of cidr\_blocks of redshift subnets | | [redshift\_subnets\_ipv6\_cidr\_blocks](#output\_redshift\_subnets\_ipv6\_cidr\_blocks) | List of IPv6 cidr\_blocks of redshift subnets in an IPv6 enabled VPC | diff --git a/outputs.tf b/outputs.tf index 5cf1ffc0c..c2367e210 100644 --- a/outputs.tf +++ b/outputs.tf @@ -105,6 +105,11 @@ output "igw_arn" { # Publiс Subnets ################################################################################ +output "public_subnet_objects" { + description = "A list of all public subnets, containing the full objects." + value = aws_subnet.public +} + output "public_subnets" { description = "List of IDs of public subnets" value = aws_subnet.public[*].id @@ -159,6 +164,11 @@ output "public_network_acl_arn" { # Private Subnets ################################################################################ +output "private_subnet_objects" { + description = "A list of all private subnets, containing the full objects." + value = aws_subnet.private +} + output "private_subnets" { description = "List of IDs of private subnets" value = aws_subnet.private[*].id @@ -213,6 +223,11 @@ output "private_network_acl_arn" { # Outpost Subnets ################################################################################ +output "outpost_subnet_objects" { + description = "A list of all outpost subnets, containing the full objects." + value = aws_subnet.outpost +} + output "outpost_subnets" { description = "List of IDs of outpost subnets" value = aws_subnet.outpost[*].id @@ -247,6 +262,11 @@ output "outpost_network_acl_arn" { # Database Subnets ################################################################################ +output "database_subnet_objects" { + description = "A list of all database subnets, containing the full objects." + value = aws_subnet.database +} + output "database_subnets" { description = "List of IDs of database subnets" value = aws_subnet.database[*].id @@ -317,6 +337,11 @@ output "database_network_acl_arn" { # Redshift Subnets ################################################################################ +output "redshift_subnet_objects" { + description = "A list of all redshift subnets, containing the full objects." + value = aws_subnet.redshift +} + output "redshift_subnets" { description = "List of IDs of redshift subnets" value = aws_subnet.redshift[*].id @@ -371,6 +396,11 @@ output "redshift_network_acl_arn" { # Elasticache Subnets ################################################################################ +output "elasticache_subnet_objects" { + description = "A list of all elasticache subnets, containing the full objects." + value = aws_subnet.elasticache +} + output "elasticache_subnets" { description = "List of IDs of elasticache subnets" value = aws_subnet.elasticache[*].id @@ -425,6 +455,11 @@ output "elasticache_network_acl_arn" { # Intra Subnets ################################################################################ +output "intra_subnet_objects" { + description = "A list of all intra subnets, containing the full objects." + value = aws_subnet.intra +} + output "intra_subnets" { description = "List of IDs of intra subnets" value = aws_subnet.intra[*].id