File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
articles/azure-resource-manager/templates Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -130,20 +130,23 @@ There are many methods for deploying templates. Azure Cloud shell is used in thi
130
130
4. From the Cloud shell, run the following commands. Select the tab to show the PowerShell code or the CLI code.
131
131
132
132
# [CLI](#tab/CLI)
133
+
133
134
```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 &&
136
137
echo " Enter the location (i.e. centralus):" &&
137
138
read location &&
139
+ resourceGroupName =" ${projectName}rg" &&
138
140
az group create --name $resourceGroupName --location " $location" &&
139
141
az deployment group create --resource-group $resourceGroupName --template-file " $HOME/azuredeploy.json"
140
142
```
141
143
142
144
# [PowerShell](#tab/PowerShell)
143
145
144
146
```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"
146
148
$location = Read-Host -Prompt " Enter the location (i.e. centralus)"
149
+ $resourceGroupName = " ${projectName}rg"
147
150
148
151
New-AzResourceGroup -Name $resourceGroupName -Location " $location"
149
152
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
170
173
5. Run the following CLI or PowerShell command to list the newly created storage account:
171
174
172
175
# [CLI](#tab/CLI)
176
+
173
177
```azurecli
174
178
echo " Enter the Resource Group name:" &&
175
179
read resourceGroupName &&
You can’t perform that action at this time.
0 commit comments