Skip to content

Commit cf252b0

Browse files
committed
update the deployment scripts
1 parent 20ec7aa commit cf252b0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/azure-resource-manager/templates/quickstart-create-templates-use-visual-studio-code.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,23 @@ There are many methods for deploying templates. Azure Cloud shell is used in thi
130130
4. From the Cloud shell, run the following commands. Select the tab to show the PowerShell code or the CLI code.
131131

132132
# [CLI](#tab/CLI)
133+
133134
```azurecli
134-
echo "Enter the Resource Group name:" &&
135-
read resourceGroupName &&
135+
echo "Enter a project name that is used to generate resource group name:" &&
136+
read projectName &&
136137
echo "Enter the location (i.e. centralus):" &&
137138
read location &&
139+
resourceGroupName="${projectName}rg" &&
138140
az group create --name $resourceGroupName --location "$location" &&
139141
az deployment group create --resource-group $resourceGroupName --template-file "$HOME/azuredeploy.json"
140142
```
141143

142144
# [PowerShell](#tab/PowerShell)
143145

144146
```azurepowershell
145-
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
147+
$projectName = Read-Host -Prompt "Enter a project name that is used to generate resource group name"
146148
$location = Read-Host -Prompt "Enter the location (i.e. centralus)"
149+
$resourceGroupName = "${projectName}rg"
147150

148151
New-AzResourceGroup -Name $resourceGroupName -Location "$location"
149152
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateFile "$HOME/azuredeploy.json"
@@ -170,6 +173,7 @@ There are many methods for deploying templates. Azure Cloud shell is used in thi
170173
5. Run the following CLI or PowerShell command to list the newly created storage account:
171174

172175
# [CLI](#tab/CLI)
176+
173177
```azurecli
174178
echo "Enter the Resource Group name:" &&
175179
read resourceGroupName &&

0 commit comments

Comments
 (0)