mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-01-04 01:01:25 -05:00
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.
13 lines
350 B
HCL
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}"]
|
|
}
|
|
}
|