Files
opentf/examples/aws-networking/subnet/security_group.tf
Martin Atkins 0e3256b6f4 examples: creating VPCs and subnets across two regions
This example demonstrates both creating a network architecture *and* the
use of data resources to minimize the number of variables needed for a
child module by discovering additional data automatically.
2016-09-24 15:19:34 -07:00

13 lines
350 B
HCL

resource "aws_security_group" "az" {
name = "az-${data.aws_availability_zone.target.name}"
description = "Open access within the AZ ${data.aws_availability_zone.target.name}"
vpc_id = "${var.vpc_id}"
ingress {
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["${aws_subnet.main.cidr_block}"]
}
}