mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 09:01:59 +03:00
14 lines
286 B
Terraform
14 lines
286 B
Terraform
resource "aws_security_group" "example" {
|
|
name = "example" # can use expressions here
|
|
|
|
dynamic "ingress" {
|
|
for_each = var.ports
|
|
content {
|
|
from_port = ingress.key
|
|
to_port = ingress.key
|
|
cidr_blocks = ingress.value
|
|
protocol = "tcp"
|
|
}
|
|
}
|
|
}
|