Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
tkerdoncuff committed Jan 22, 2024
1 parent cb64873 commit 6e62408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ resource "aws_route_table" "quortex_private" {
for_each = local.enable_nat_gateway ? [1] : []

content {
cidr_block = "0.0.0.0/0"
nat_gateway_id = aws_nat_gateway.quortex[index(aws_nat_gateway.quortex[*].availability_zone, each.value.availability_zone)].id
cidr_block = "0.0.0.0/0"
#nat_gateway_id = aws_nat_gateway.quortex[index(aws_nat_gateway.quortex[*].availability_zone, each.value.availability_zone)].id
nat_gateway_id = aws_nat_gateway.quortex[index(aws_nat_gateway.quortex[*].tags["AvailabilityZone"], each.value.availability_zone)].id
}
}

Expand Down
2 changes: 1 addition & 1 deletion nat_gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "aws_nat_gateway" "quortex" {
#allocation_id = var.nat_eip_allocation_id == "" ? aws_eip.quortex[0].id : data.aws_eip.existing_eip[0].id
subnet_id = each.value.id

tags = merge({ "Name" = var.nat_gateway.name }, var.tags)
tags = merge({ "Name" = var.nat_gateway.name, "AvailabilityZone" = each.value.availability_zone }, var.tags)

depends_on = [aws_internet_gateway.quortex]
}

0 comments on commit 6e62408

Please sign in to comment.