32 lines
717 B
HCL
32 lines
717 B
HCL
|
|
resource "aws_network_acl" "this" {
|
|
vpc_id = var.vpc_id
|
|
subnet_ids = var.subnet_ids
|
|
tags = {
|
|
Name = var.acl_name
|
|
}
|
|
dynamic "ingress" {
|
|
for_each = var.ingress_rules
|
|
content {
|
|
rule_no = ingress.value[0]
|
|
protocol = ingress.value[1]
|
|
from_port = ingress.value[2]
|
|
to_port = ingress.value[3]
|
|
cidr_block = ingress.value[4]
|
|
action = ingress.value[5]
|
|
}
|
|
}
|
|
|
|
dynamic "egress" {
|
|
for_each = var.egress_rules
|
|
content {
|
|
rule_no = egress.value[0]
|
|
protocol = egress.value[1]
|
|
from_port = egress.value[2]
|
|
to_port = egress.value[3]
|
|
cidr_block = egress.value[4]
|
|
action = egress.value[5]
|
|
}
|
|
}
|
|
|
|
} |