Hi Community
I am looking for suggestions/advice. We are currently creating 3 subnets which align to 3 AZs in EU-WEST-2. We are now looking to create additional subnets so effectively increasing the count to 6, what we would like is the first 3 subnets to use one of the 3 AZs and then the second 3 subnets to repeat and use one of the 3 AZs.
Below is our current code and we are effectively looking to increase the length(var.vpc-tier-private-cidr) to 6.
resource "aws_subnet" "subnet-tier-private" {
count = length(var.vpc-tier-private-cidr)
vpc_id = aws_vpc.vpc.id
cidr_block = element(var.vpc-tier-private-cidr, count.index)
availability_zone = element(data.aws_availability_zones.available.names, count.index)
Hope someone can help!!!