-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creation of VNET exceeds the maximum character limit for the VNET name #881
Comments
Tagging @jtracey93 as requested by him |
Thanks @ositobio - assigning this to myself to investigate and resolve 👍 |
Initial InvestigationVNet names passed in by the VNET Naming Patter Today Explained-vnet- Total possible length of SUBID + enterpriseScaleCompanyPrefix + "-vnet-" = 52 characters This leaves only 12 characters for the location section. Locations names that are longer than 12 characters in lengthUsing the below PowerShell against Azure Public, I have found the following list of regions that are longer than 12 characters in length: $locations = Get-AzLocation
$locationHashTable = @{}
foreach ($location in $locations) {
$locationLength = $location.Location.Length
$locationDisplayName = $location.DisplayName
$locationShortName = $location.Location
if ($locationLength -ge 13) {
Write-Host -ForegroundColor Yellow "$locationDisplayName is longer than 12 characters: $locationShortName is actually $locationLength characters"
} else {
Write-Host -ForegroundColor Green "$locationDisplayName is 12 characters or less: $locationShortName is actually $locationLength characters"
}
$locationHashTable.Add($location.Location, $location.Location.Length)
}
$locationHashTable.GetEnumerator() | Sort-Object -Property Value -Descending Locations potentially impactedAzure Public
Azure Gov (Fairfax)
Azure China (Mooncake)No regions currently impacted SummaryIf a customer selects a region that is potentially impacted by this issue as listed in above tables and sets the ESLZ prefix to 10 characters (it's max length) then VNET deployments will fail using the ESLZ portal experience due to the VNet name being longer than 64 characters. Workarounds (prior to fix being implemented)
Next StepsI will investigate the best way to fix this in the short term and longer term and create required PRs shortly |
Linking to #674 |
Trigger ADO Sync 1 |
Trigger ADO Sync 2 |
When creating a landing zone, if the Resource Group name is too long, when the template creates the name for the VNET attaching the IDs and RG name, it causes an exception and gives the following error:
While selecting this, we could see that the virtual network created as part of this step has the subscription ID tagged in its name and deployment failed with the error: code\\\": \\\"NetcfgInvalidVirtualNetworkSite\\\",\\r\\n \\\"message\\\": \\\"Virtual network site is not valid as specified with the name 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXNameTooLongToCauseAProblemWithExceedeingLength'
As per Microsoft Documentation, the limit is 64 characters
Crating the VNET manually doesn't happen, but the templates or the logic shouldn't let the name exceed the limit.
The text was updated successfully, but these errors were encountered: