resource "azurerm_firewall_network_rule_collection" "network_rules" {
for_each = { for k, v in var.network_rule_collections : k => v }
name = each.value.name
azure_firewall_name = var.firewall_name
resource_group_name = var.rg_name
priority = each.value.priority
action = title(each.value.action)
dynamic "rule" {
for_each = each.value.rules
content {
name = rule.value.name
protocols = upper(rule.value.protocols)
description = rule.value.description
source_addresses = rule.value.source_addresses
source_ip_groups = rule.value.source_ip_groups
destination_addresses = rule.value.destination_addresses
destination_ports = rule.value.destination_ports
destination_ip_groups = rule.value.destination_ip_groups
destination_fqdns = rule.value.destination_fqdns
}
}
}
No requirements.
Name | Version |
---|---|
azurerm | n/a |
No modules.
Name | Type |
---|---|
azurerm_firewall_network_rule_collection.network_rules | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
firewall_name | The name of the Azure firewall this rule collection should be added to | string |
n/a | yes |
network_rule_collections | A list of network rule collections, each containing a list of network rules. | list(object({ |
[] |
no |
rg_name | The name of the resource group the Azure firewall resides within | string |
n/a | yes |
Name | Description |
---|---|
network_rule_collections_output | The network rule collections created by the module. |
network_rule_ids | The IDs of the network rule collections. |
network_rule_names | The names of the network rule collections. |
network_rules | Details of the network rules within each collection. |