init
This commit is contained in:
16
modules/sg-rule-add/main.tf
Normal file
16
modules/sg-rule-add/main.tf
Normal file
@ -0,0 +1,16 @@
|
||||
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"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user