Terraform - loops
问题 Is it possible to create a loop that creates this resources? There is a lot of repetition of the same resources. I tried using maps to create a loop but map doesn't accept anything other default block. Or is it normal to manually create all 4 resources? Just some suggestions as answer is enough, I'm trying to learn it myself. resource "aws_subnet" "public-test-a" { vpc_id = aws_vpc.vpc-test-02.id cidr_block = "10.0.0.16/28" map_public_ip_on_launch = true availability_zone = var.AZ[1] tags = {