Skip to content

A module used to help simpify the application firewall rules within a Azure Firewall 🧱✅

License

Notifications You must be signed in to change notification settings

cyber-scot/terraform-azurerm-firewall-application-rules

 
 

Repository files navigation

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
        }
      }
    }
  }
}

Requirements

No requirements.

Providers

Name Version
azurerm n/a

Modules

No modules.

Resources

Name Type
azurerm_firewall_application_rule_collection.application_rules resource

Inputs

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

Outputs

Name Description
application_rule_collections_output The application rule collections created by the module.
application_rule_ids The IDs of the application rule collections.
application_rule_names The names of the application rule collections.
application_rules Details of the application rules within each collection.

About

A module used to help simpify the application firewall rules within a Azure Firewall 🧱✅

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 53.2%
  • HCL 46.8%