Use valid ASG names
March 21, 2025 ยท View on GitHub
SYNOPSIS
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
nameto a value that meets the requirements.
For example:
{
"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
nameto a value that meets the requirements.
For example:
resource asg 'Microsoft.Network/applicationSecurityGroups@2022-01-01' = {
name: asgName
location:location
properties: {}
}
NOTES
This rule does not check if ASG names are unique.