Skip to content

Commit

Permalink
Extend outputs of module with CIDR blocks (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
snovikov authored Oct 9, 2024
1 parent 8b48ada commit 7cbca7a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,12 @@ Default:
| <a name="output_name"></a> [name](#output\_name) | The name of the VPC |
| <a name="output_private_route_table_ids"></a> [private\_route\_table\_ids](#output\_private\_route\_table\_ids) | List of IDs of private route tables |
| <a name="output_private_subnets"></a> [private\_subnets](#output\_private\_subnets) | List of IDs of private subnets |
| <a name="output_private_subnets_cidr_blocks"></a> [private\_subnets\_cidr\_blocks](#output\_private\_subnets\_cidr\_blocks) | List of cidr\_blocks of private subnets |
| <a name="output_public_route_table_ids"></a> [public\_route\_table\_ids](#output\_public\_route\_table\_ids) | List of IDs of public route tables |
| <a name="output_public_subnets"></a> [public\_subnets](#output\_public\_subnets) | List of IDs of public subnets |
| <a name="output_public_subnets_cidr_blocks"></a> [public\_subnets\_cidr\_blocks](#output\_public\_subnets\_cidr\_blocks) | List of cidr\_blocks of public subnets |
| <a name="output_vgw_id"></a> [vgw\_id](#output\_vgw\_id) | The ID of the VPN Gateway |
| <a name="output_vpc_cidr_block"></a> [vpc\_cidr\_block](#output\_vpc\_cidr\_block) | The CIDR block of the VPC |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC |

<!-- TFDOCS_OUTPUTS_END -->
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# VPC Resources
# -------------------------------------------------------------------------------------------------
module "aws_vpc" {
source = "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v5.5.1"
source = "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v5.13.0"

cidr = var.vpc_cidr
azs = var.vpc_subnet_azs
Expand Down
20 changes: 20 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ output "vpc_id" {
value = module.aws_vpc.vpc_id
}

output "vpc_cidr_block" {
description = "The CIDR block of the VPC"
value = module.aws_vpc.vpc_cidr_block
}

output "private_subnets" {
description = "List of IDs of private subnets"
value = module.aws_vpc.private_subnets
}

output "private_subnets_cidr_blocks" {
description = "List of cidr_blocks of private subnets"
value = module.aws_vpc.private_subnets_cidr_blocks
}

output "private_route_table_ids" {
description = "List of IDs of private route tables"
value = module.aws_vpc.private_route_table_ids
Expand All @@ -26,6 +36,16 @@ output "public_subnets" {
value = module.aws_vpc.public_subnets
}

output "public_subnets_cidr_blocks" {
description = "List of cidr_blocks of public subnets"
value = module.aws_vpc.public_subnets_cidr_blocks
}

output "public_route_table_ids" {
description = "List of IDs of public route tables"
value = module.aws_vpc.public_route_table_ids
}

output "vgw_id" {
description = "The ID of the VPN Gateway"
value = module.aws_vpc.vgw_id
Expand Down

0 comments on commit 7cbca7a

Please sign in to comment.