diff --git a/terraform/modules/aws-vpc/main.tf b/terraform/modules/aws-vpc/main.tf index c1add8c..3c69d7d 100644 --- a/terraform/modules/aws-vpc/main.tf +++ b/terraform/modules/aws-vpc/main.tf @@ -1,5 +1,5 @@ locals { - az_count = length(var.azs) + az_count = length(var.azs) - 1 cidr_subnets = [for cidr_block in cidrsubnets(var.cidr, 2, 2, 2, 2) : cidrsubnets(cidr_block, 4, 4, 4, 4)] private_subnets = chunklist(local.cidr_subnets[0], local.az_count)[0] public_subnets = chunklist(local.cidr_subnets[1], local.az_count)[0]