Skip to content

Use valid Firewall names#

Operational Excellence · Firewall · Rule · 2021_12 · Awareness

Firewall names should meet naming requirements.

Description#

When naming Azure resources, resource names must meet service requirements. The requirements for Firewall names are:

  • Between 1 and 80 characters long.
  • Alphanumerics, underscores, periods, and hyphens.
  • Start with alphanumeric.
  • End alphanumeric or underscore.
  • Firewall names must be unique within a resource group.

Recommendation#

Consider using names that meet Firewall naming requirements. Additionally consider naming resources with a standard naming convention.

Examples#

Configure with Azure template#

To deploy firewalls that pass this rule:

  • Set the name property to align to resource naming requirements.

For example:

Azure Template snippet
{
  "type": "Microsoft.Network/azureFirewalls",
  "apiVersion": "2023-02-01",
  "name": "[parameters('name')]",
  "location": "[parameters('location')]",
  "properties": {
    "sku": {
      "name": "AZFW_VNet",
      "tier": "Premium"
    },
    "firewallPolicy": {
      "id": "[resourceId('Microsoft.Network/firewallPolicies', format('{0}_policy', parameters('name')))]"
    }
  },
  "dependsOn": [
    "firewall_policy"
  ]
}

Configure with Bicep#

To deploy firewalls that pass this rule:

  • Set the name property to align to resource naming requirements.

For example:

Azure Bicep snippet
resource firewall 'Microsoft.Network/azureFirewalls@2023-02-01' = {
  name: name
  location: location
  properties: {
    sku: {
      name: 'AZFW_VNet'
      tier: 'Premium'
    }
    firewallPolicy: {
      id: firewall_policy.id
    }
  }
}

Notes#

This rule does not check if Firewall names are unique.

Comments