From 92a7b7494d3c7c5d8714681a1032dfc0d1197b48 Mon Sep 17 00:00:00 2001 From: Sol Malisani Date: Mon, 10 Apr 2023 12:55:29 -0300 Subject: [PATCH 1/2] NOTICKER: Fix condition in RT sys count --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index fa5aa0b65..e8c975bed 100644 --- a/main.tf +++ b/main.tf @@ -359,7 +359,7 @@ resource "aws_route_table" "intra" { ################################################################################ resource "aws_route_table" "sys" { - count = local.create_vpc && local.max_subnet_length > 0 ? local.nat_gateway_count : 0 + count = local.create_vpc && length(var.sys_subnets) > 0 ? 1 : 0 vpc_id = local.vpc_id From 7ff885faa06652912904d657bae91a474880802c Mon Sep 17 00:00:00 2001 From: Sol Malisani Date: Mon, 10 Apr 2023 15:01:47 -0300 Subject: [PATCH 2/2] NOTICKET: Update number of RT to number of sys subnets --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index e8c975bed..3ee6f92c2 100644 --- a/main.tf +++ b/main.tf @@ -355,11 +355,11 @@ resource "aws_route_table" "intra" { ################################################################################ # Sys routes -# There are as many routing tables as the number of NAT gateways +# There are as many routing tables as the number of sys subnets ################################################################################ resource "aws_route_table" "sys" { - count = local.create_vpc && length(var.sys_subnets) > 0 ? 1 : 0 + count = local.create_vpc && length(var.sys_subnets) > 0 ? length(var.sys_subnets) : 0 vpc_id = local.vpc_id