Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
tkerdoncuff committed Jan 25, 2024
1 parent e5cf671 commit c2842d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ resource "aws_route_table" "quortex_private" {

# Route to the NAT, if NAT is enabled...
dynamic "route" {
for_each = length([for k, v in var.nat_gateways : v if v.subnet_key == each.key]) > 0 ? [1] : []
for_each = length([for k, v in aws_nat_gateway.quortex : v.id if v.tags["AvailabilityZone"] == each.value.availability_zone]) > 0 ? [1] : []

content {
cidr_block = "0.0.0.0/0"
Expand All @@ -130,7 +130,7 @@ resource "aws_route_table" "quortex_private" {

# ...otherwise, route to the Internet Gateway
dynamic "route" {
for_each = length([for k, v in var.nat_gateways : v if v.subnet_key == each.key]) == 0 ? [1] : []
for_each = length([for k, v in aws_nat_gateway.quortex : v.id if v.tags["AvailabilityZone"] == each.value.availability_zone]) == 0 ? [1] : []

content {
cidr_block = "0.0.0.0/0"
Expand Down

0 comments on commit c2842d8

Please sign in to comment.