Skip to content

Commit 50af905

Browse files
committed
fix ipv6 egress route for single nat
1 parent 83187ed commit 50af905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ resource "aws_egress_only_internet_gateway" "this" {
10731073
}
10741074

10751075
resource "aws_route" "private_ipv6_egress" {
1076-
count = local.create_vpc && var.create_egress_only_igw && var.enable_ipv6 && local.len_private_subnets > 0 ? local.nat_gateway_count : 0
1076+
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
10771077

10781078
route_table_id = element(aws_route_table.private[*].id, count.index)
10791079
destination_ipv6_cidr_block = "::/0"

0 commit comments

Comments
 (0)