github.com/candidpartners/terraform@v0.9.5-0.20171005231213-29f5f88820f6/examples/aws-networking/region/subnets.tf (about) 1 data "aws_availability_zones" "all" { 2 } 3 4 module "primary_subnet" { 5 source = "../subnet" 6 vpc_id = "${aws_vpc.main.id}" 7 availability_zone = "${data.aws_availability_zones.all.names[0]}" 8 } 9 10 module "secondary_subnet" { 11 source = "../subnet" 12 vpc_id = "${aws_vpc.main.id}" 13 availability_zone = "${data.aws_availability_zones.all.names[1]}" 14 }