Skip to content

Use valid ASG names#

Operational Excellence · Application Security Group · Rule · 2021_12 · Awareness

Application Security Group (ASG) names should meet naming requirements.

Description#

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

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

Recommendation#

Consider using names that meet Application Security Group naming requirements. Additionally consider naming resources with a standard naming convention.

Examples#

Configure with Azure template#

To deploy Application Security Groups that pass this rule:

  • Set name to a value that meets the requirements.

For example:

Azure Template snippet
{
  "type": "Microsoft.Network/applicationSecurityGroups",
  "apiVersion": "2022-01-01",
  "name": "[parameters('asgName')]",
  "location": "[parameters('location')]",
  "properties": {}
}

Configure with Bicep#

To deploy Application Security Groups that pass this rule:

  • Set name to a value that meets the requirements.

For example:

Azure Bicep snippet
resource asg 'Microsoft.Network/applicationSecurityGroups@2022-01-01' = {
  name: asgName
  location:location
  properties: {}
}

Notes#

This rule does not check if ASG names are unique.

Comments