github.com/candidpartners/terraform@v0.9.5-0.20171005231213-29f5f88820f6/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  }