From 50af905dbbe2045de399bcfc4c238894180c4f93 Mon Sep 17 00:00:00 2001 From: jeremy Date: Wed, 23 Jul 2025 17:48:32 +0200 Subject: [PATCH] fix ipv6 egress route for single nat --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 618aa2c10..54326b68f 100644 --- a/main.tf +++ b/main.tf @@ -1073,7 +1073,7 @@ resource "aws_egress_only_internet_gateway" "this" { } resource "aws_route" "private_ipv6_egress" { - count = local.create_vpc && var.create_egress_only_igw && var.enable_ipv6 && local.len_private_subnets > 0 ? local.nat_gateway_count : 0 + count = local.create_vpc && var.create_egress_only_igw && var.enable_ipv6 && local.len_private_subnets > 0 ? ( var.single_nat_gateway ? local.len_private_subnets : local.nat_gateway_count ) : 0 route_table_id = element(aws_route_table.private[*].id, count.index) destination_ipv6_cidr_block = "::/0"