21 lines
504 B
HCL
21 lines
504 B
HCL
resource "hcloud_firewall" "firewall" {
|
|
name = var.firewall_name
|
|
labels = merge(
|
|
var.firewall_labels,
|
|
{
|
|
"Resource_Type" = "Firewall"
|
|
"Service_Type" = var.firewall_service_type
|
|
}
|
|
)
|
|
|
|
dynamic "rule" {
|
|
for_each = local.rule_set
|
|
content {
|
|
description = rule.value["description"]
|
|
direction = rule.value["direction"]
|
|
port = rule.value["port"]
|
|
protocol = rule.value["protocol"]
|
|
source_ips = rule.value["source_ips"]
|
|
}
|
|
}
|
|
}
|