Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

Latest commit

 

History

History
47 lines (31 loc) · 1.81 KB

File metadata and controls

47 lines (31 loc) · 1.81 KB
pillar Operational Excellence
category Resource naming
online version https://github.com/microsoft/PSRule.Rules.CAF/blob/main/docs/rules/en/CAF.Name.VNET.md

Use standard VNET names

SYNOPSIS

Virtual network names should use a standard prefix.

DESCRIPTION

An effective naming convention allows operators to quickly identify resource type, associated workload, deployment environment and Azure region.

For virtual networks, the Cloud Adoption Framework recommends using the vnet- prefix.

Requirements for virtual network names:

  • At least 2 characters, but no more than 64.
  • Can include alphanumeric, underscore, hyphen, period characters.
  • Can only start with a letter or number, and end with a letter, number or underscore.
  • VNET names must be unique within a resource group.

RECOMMENDATION

Consider creating virtual networks with a standard name. Additionally consider using Azure Policy to only permit creation using a standard naming convention.

NOTES

This rule does not check if virtual network names are unique.

To configure this rule:

  • Override the CAF_VirtualNetworkPrefix configuration value with an array of allowed prefixes.
  • Override CAF_UseLowerNames with false to allow mixed case in resource names. By default only lower-case letters and other supported characters are allowed. This option affects all resource name rules.

LINKS