Skip to content

Commit

Permalink
fix: Do not replace NAT gateways when additional subnets are added (#…
Browse files Browse the repository at this point in the history
…1055)

fix: Do not replace nat gateways when new private subnets are added
  • Loading branch information
manuelmazzuola committed Apr 26, 2024
1 parent e491354 commit cf18c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ resource "aws_route" "private_ipv6_egress" {

locals {
nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length
nat_gateway_ips = var.reuse_nat_ips ? var.external_nat_ip_ids : try(aws_eip.nat[*].id, [])
nat_gateway_ips = var.reuse_nat_ips ? var.external_nat_ip_ids : aws_eip.nat[*].id
}

resource "aws_eip" "nat" {
Expand Down

0 comments on commit cf18c37

Please sign in to comment.