17 lines
426 B
HCL
17 lines
426 B
HCL
resource "aws_security_group_rule" "sg-rule-add" {
|
|
# description = "Security groups rule add"
|
|
|
|
type = var.type
|
|
// rules
|
|
for_each = var.rules
|
|
from_port = each.value.from_port
|
|
to_port = each.value.to_port
|
|
protocol = each.value.protocol
|
|
cidr_blocks = [each.value.cidr_blocks]
|
|
|
|
security_group_id = var.security_group_id
|
|
|
|
description = "${var.tag_name}-sg-rule"
|
|
|
|
}
|