resource "azurerm_firewall_application_rule_collection" "application_rules" {
for_each = { for k, v in var.application_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
description = rule.value.description
source_addresses = rule.value.source_addresses
source_ip_groups = rule.value.source_ip_groups
fqdn_tags = rule.value.fqdn_tags
target_fqdns = rule.value.target_fqdns
dynamic "protocol" {
for_each = rule.value.protocol
content {
port = protocol.value.port
type = protocol.value.type
}
}
}
}
}
No requirements.
No modules.
| Name |
Description |
Type |
Default |
Required |
| application_rule_collections |
A list of network rule collections, each containing a list of network rules. |
list(object({ name = string action = string priority = number rules = list(object({ name = string description = optional(string) fqdn_tags = optional(set(string)) target_fqdns = optional(list(string)) source_addresses = optional(list(string)) source_ip_groups = optional(list(string)) protocol = optional(list(object({ port = optional(string) type = optional(string) }))) })) })) |
[] |
no |
| firewall_name |
The name of the Azure firewall this rule collection should be added to |
string |
n/a |
yes |
| rg_name |
The name of the resource group the Azure firewall resides within |
string |
n/a |
yes |