Skip to content

Commit ca3fb21

Browse files
authored
Merge pull request #125075 from SvenAelterman/patch-50
Fix generation of storage account name
2 parents 8bf6e2d + 50337e5 commit ca3fb21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
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
@@ -369,4 +370,4 @@ At line:1 char:1
369370

370371
- Review concepts related to [DNS security policy](dns-security-policy.md).
371372
- Review [Azure Private DNS zones scenarios](private-dns-scenarios.md).
372-
- Review [DNS resolution in virtual networks](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md).
373+
- Review [DNS resolution in virtual networks](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md).

0 commit comments

Comments
 (0)