From 45e991a1fb7a764f3b63d117b13bcda68541a90b Mon Sep 17 00:00:00 2001 From: Chethana-22 Date: Sun, 27 Apr 2025 16:09:56 +0530 Subject: [PATCH 1/4] added output for private route table association objects --- outputs.tf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/outputs.tf b/outputs.tf index 1d1d2783a..64125bb11 100644 --- a/outputs.tf +++ b/outputs.tf @@ -198,6 +198,10 @@ output "private_route_table_ids" { description = "List of IDs of private route tables" value = local.private_route_table_ids } +output "private_route_table_association_objects" { + description = "A list of all private route table associations, containing the full aws_route_table_association objects." + value = aws_route_table_association.private +} output "private_nat_gateway_route_ids" { description = "List of IDs of the private nat gateway route" @@ -667,3 +671,4 @@ output "name" { description = "The name of the VPC specified as argument to this module" value = var.name } + From c3898dc32a5664fe1bd65ad1d3ad6f774f1ba3a2 Mon Sep 17 00:00:00 2001 From: Chethana-22 Date: Sun, 27 Apr 2025 16:21:39 +0530 Subject: [PATCH 2/4] added output for private route table association objects --- examples/issues/outputs.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/issues/outputs.tf b/examples/issues/outputs.tf index adcd57608..1575e432f 100644 --- a/examples/issues/outputs.tf +++ b/examples/issues/outputs.tf @@ -108,3 +108,11 @@ output "issue_108_nat_public_ips" { description = "List of public Elastic IPs created for AWS NAT Gateway" value = module.vpc_issue_108.nat_public_ips } + +################################################################################ +# Issue #1182 +################################################################################ +output "private_route_table_association_objects" { + description = "The list of private route table associations from the VPC module" + value = module.vpc.private_route_table_association_objects +} \ No newline at end of file From 3858547006845aaea40fdeb5c031926a13ce9e19 Mon Sep 17 00:00:00 2001 From: Chethana-22 Date: Sun, 27 Apr 2025 16:36:18 +0530 Subject: [PATCH 3/4] added output for private route table association objects --- examples/issues/outputs.tf | 2 +- outputs.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/issues/outputs.tf b/examples/issues/outputs.tf index 1575e432f..82aa67e0e 100644 --- a/examples/issues/outputs.tf +++ b/examples/issues/outputs.tf @@ -115,4 +115,4 @@ output "issue_108_nat_public_ips" { output "private_route_table_association_objects" { description = "The list of private route table associations from the VPC module" value = module.vpc.private_route_table_association_objects -} \ No newline at end of file +} diff --git a/outputs.tf b/outputs.tf index 64125bb11..14b5492da 100644 --- a/outputs.tf +++ b/outputs.tf @@ -672,3 +672,4 @@ output "name" { value = var.name } + From 518dfb9656353f21fdff04cb07c2dd2596be0a5d Mon Sep 17 00:00:00 2001 From: Chethana-22 Date: Sun, 27 Apr 2025 16:47:57 +0530 Subject: [PATCH 4/4] added output for private route table association objects --- examples/issues/main.tf | 24 ++++++++++++++++++++++++ examples/issues/outputs.tf | 2 +- outputs.tf | 2 -- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/examples/issues/main.tf b/examples/issues/main.tf index 9e23b806f..c5890064e 100644 --- a/examples/issues/main.tf +++ b/examples/issues/main.tf @@ -89,3 +89,27 @@ module "vpc_issue_108" { Name = "route-already-exists" }, local.tags) } + +################################################################################ +# Issue 1182 - https://github.com/terraform-aws-modules/terraform-aws-vpc/issues/1182 +################################################################################ + +module "vpc_issue_1182" { + source = "../../" + + name = "route-table" + cidr = "10.0.0.0/16" + + azs = local.azs + private_subnets = ["10.0.0.0/24", "10.0.1.0/24"] + public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] + + enable_nat_gateway = true + single_nat_gateway = false + enable_vpn_gateway = true + + tags = merge({ + Issue = "1182" + Name = "route-table" + }, local.tags) +} diff --git a/examples/issues/outputs.tf b/examples/issues/outputs.tf index 82aa67e0e..59d416853 100644 --- a/examples/issues/outputs.tf +++ b/examples/issues/outputs.tf @@ -114,5 +114,5 @@ output "issue_108_nat_public_ips" { ################################################################################ output "private_route_table_association_objects" { description = "The list of private route table associations from the VPC module" - value = module.vpc.private_route_table_association_objects + value = module.vpc_issue_1182.private_route_table_association_objects } diff --git a/outputs.tf b/outputs.tf index 14b5492da..0f4032b35 100644 --- a/outputs.tf +++ b/outputs.tf @@ -671,5 +671,3 @@ output "name" { description = "The name of the VPC specified as argument to this module" value = var.name } - -