Skip to content

Commit 50337e5

Browse files
Improve storage account name generation
1 parent a511cce commit 50337e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/dns/dns-traffic-log-how-to.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ Set up a local PowerShell repository and install the Az.DnsResolver PowerShell m
239239
$domainListName = "domainlist-$($nameSuffix)"
240240
$securityRuleName = "securityrule-$($nameSuffix)"
241241
$resolverPolicyLinkName = "dnsresolverpolicylink"
242-
$storageAccountName = "stor$($name)" # Customize this, taking care that the name is not too long
242+
$storageAccountName = "stor$($name.ToLower())" # Customize this, taking care that the name is not too long
243+
$storageAccountName = $storageAccountName.Substring(0, [Math]::Min(24, $storageAccountName.Length)) # Storage account names must be 3-24 characters long
243244
$diagnosticSettingName = "diagnosticsetting-$($nameSuffix)"
244245
$vnetId = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Network/virtualNetworks/$virtualNetworkName"
245246

0 commit comments

Comments
 (0)