Skip to content

Commit

Permalink
add defaults for route table
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitPhulera committed Nov 10, 2023
1 parent b66895c commit f5d2272
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 f5d2272

Please sign in to comment.