github.com/gettyimages/terraform@v0.7.6-0.20161219132226-dc052c5707a3/examples/aws-networking/subnet/security_group.tf (about) 1 resource "aws_security_group" "az" { 2 name = "az-${data.aws_availability_zone.target.name}" 3 description = "Open access within the AZ ${data.aws_availability_zone.target.name}" 4 vpc_id = "${var.vpc_id}" 5 6 ingress { 7 from_port = 0 8 to_port = 0 9 protocol = -1 10 cidr_blocks = ["${aws_subnet.main.cidr_block}"] 11 } 12 }