Commit cf18c375 authored by Manuel Mazzuola's avatar Manuel Mazzuola Committed by GitHub

fix: Do not replace NAT gateways when additional subnets are added (#1055)

fix: Do not replace nat gateways when new private subnets are added
parent e491354b
......@@ -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" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment