From 77df552a8aa43bb3711243a3a5ef3e29f70a4068 Mon Sep 17 00:00:00 2001 From: wiseelf <30684491+wiseelf@users.noreply.github.com> Date: Sat, 6 Apr 2024 02:27:00 +0200 Subject: [PATCH] fix: Create the same number of IPv6 egress only gateway routes as the number of NAT gateways that are enabled/created (#1059) --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index ef65f2be7..d7429e59f 100644 --- a/main.tf +++ b/main.tf @@ -1021,7 +1021,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 + count = local.create_vpc && var.create_egress_only_igw && var.enable_ipv6 ? local.nat_gateway_count : 0 route_table_id = element(aws_route_table.private[*].id, count.index) destination_ipv6_cidr_block = "::/0"