From 1d009778a16c9c69515e87f746d83922809e7421 Mon Sep 17 00:00:00 2001 From: Krishanu Chakraborty Date: Sun, 25 Aug 2024 23:42:06 +0530 Subject: [PATCH] Session 6 Goal 1 | Remove unused declarations number_of_public_subnets, number_of_private_subnets, number_of_secure_subnets --- local.tf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/local.tf b/local.tf index 7f7607a..2dee97e 100644 --- a/local.tf +++ b/local.tf @@ -2,11 +2,7 @@ locals { vpc_id = module.vpc.vpc_id azs = slice(data.aws_availability_zones.available.names, 0, 2) - number_of_public_subnets = var.public_subnets - number_of_private_subnets = var.private_subnets - number_of_secure_subnets = var.secure_subnets - - public_subnet_cidrs = [for i in range(number_of_public_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 1)] - private_subnet_cidrs = [for i in range(number_of_private_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 3)] - secure_subnet_cidrs = [for i in range(number_of_secure_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 5)] + public_subnet_cidrs = [for i in range(var.public_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 1)] + private_subnet_cidrs = [for i in range(var.private_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 3)] + secure_subnet_cidrs = [for i in range(var.secure_subnets) : cidrsubnet(var.vpc_cidr, 3, i + 5)] } \ No newline at end of file