add template for directives

This commit is contained in:
mhoffm
2021-09-17 20:53:40 +02:00
committed by Michael Hoffmann
parent 67a5c19755
commit c0513ba689
1582 changed files with 28118 additions and 16805 deletions

View File

@@ -0,0 +1,22 @@
// a resource named "aws_security_groups" does not exist in the schema
variable "sg_ports" {
type = list(number)
description = "List of ingress ports"
default = [8200, 8201, 8300, 9200, 9500]
}
resource "aws_security_groups" "dynamicsg" {
name = "dynamicsg"
description = "Ingress for Vault"
dynamic "ingress" {
|| for_each = var.sg_ports
content {
from_port = ingress.value
to_port = ingress.value
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
}