github.com/emc-cmd/terraform@v0.7.8-0.20161101145618-f16309630e7c/examples/aws-networking/subnet/subnet.tf (about) 1 resource "aws_subnet" "main" { 2 cidr_block = "${cidrsubnet(data.aws_vpc.target.cidr_block, 4, lookup(var.az_numbers, data.aws_availability_zone.target.name_suffix))}" 3 vpc_id = "${var.vpc_id}" 4 } 5 6 resource "aws_route_table" "main" { 7 vpc_id = "${var.vpc_id}" 8 } 9 10 resource "aws_route_table_association" "main" { 11 subnet_id = "${aws_subnet.main.id}" 12 route_table_id = "${aws_route_table.main.id}" 13 }