Skip to content

Commit

Permalink
Merge pull request #6177 from dimagi/ap/fix-route-table-config
Browse files Browse the repository at this point in the history
Add defaults for route table
  • Loading branch information
AmitPhulera authored Jan 5, 2024
2 parents 39f6f61 + f554c77 commit a9e77ca
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/commcare_cloud/terraform/modules/network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ resource "aws_route_table" "private" {
vpc_id = aws_vpc.main.id

dynamic "route" {
for_each = var.external_routes
for_each = concat(
tolist([
tomap({
cidr_block = "0.0.0.0/0",
nat_gateway_id = aws_nat_gateway.main.id,
}),
]),
var.external_routes,
)

content {
# TF-UPGRADE-TODO: The automatic upgrade tool can't predict
# which keys might be set in maps assigned here, so it has
Expand Down Expand Up @@ -129,7 +138,15 @@ resource "aws_route_table" "public" {
vpc_id = aws_vpc.main.id

dynamic "route" {
for_each = var.external_routes
for_each = concat(
tolist([
tomap({
cidr_block = "0.0.0.0/0",
"gateway_id" = aws_internet_gateway.main.id,
}),
]),
var.external_routes,
)
content {
# TF-UPGRADE-TODO: The automatic upgrade tool can't predict
# which keys might be set in maps assigned here, so it has
Expand Down

0 comments on commit a9e77ca

Please sign in to comment.