Skip to content

Commit aef7b00

Browse files
committed
update
1 parent fe6efc6 commit aef7b00

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

articles/azure-resource-manager/templates/template-tutorial-create-templates-with-dependent-resources.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ When you explore the template in this section, try to answer these questions:
6464

6565
There are six resources defined by the template:
6666

67-
* `Microsoft.Storage/storageAccounts`. See the [template reference](/azure/templates/Microsoft.Storage/storageAccounts).
68-
* `Microsoft.Network/publicIPAddresses`. See the [template reference](/azure/templates/microsoft.network/publicipaddresses).
69-
* `Microsoft.Network/networkSecurityGroups`. See the [template reference](/azure/templates/microsoft.network/networksecuritygroups).
70-
* `Microsoft.Network/virtualNetworks`. See the [template reference](/azure/templates/microsoft.network/virtualnetworks).
71-
* `Microsoft.Network/networkInterfaces`. See the [template reference](/azure/templates/microsoft.network/networkinterfaces).
72-
* `Microsoft.Compute/virtualMachines`. See the [template reference](/azure/templates/microsoft.compute/virtualmachines).
67+
* [**Microsoft.Storage/storageAccounts**](/azure/templates/Microsoft.Storage/storageAccounts).
68+
* [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses).
69+
* [**Microsoft.Network/networkSecurityGroups**](/azure/templates/microsoft.network/networksecuritygroups).
70+
* [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks).
71+
* [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkinterfaces).
72+
* [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines).
7373

74-
It is helpful to get some basic understanding of the template before customizing it.
74+
It is helpful to review the template reference before customizing a template.
7575

7676
1. Expand the first resource. It is a storage account. Compare the resource definition to the [template reference](/azure/templates/Microsoft.Storage/storageAccounts).
7777

@@ -125,11 +125,12 @@ There are many methods for deploying templates. In this tutorial, you use Cloud
125125
1. From the Cloud shell, run the following PowerShell commands. To increase security, use a generated password for the virtual machine administrator account. See [Prerequisites](#prerequisites).
126126

127127
```azurepowershell
128-
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
128+
$projectName = Read-Host -Prompt "Enter a project name that is used to generate resource group name"
129129
$location = Read-Host -Prompt "Enter the location (i.e. centralus)"
130130
$adminUsername = Read-Host -Prompt "Enter the virtual machine admin username"
131131
$adminPassword = Read-Host -Prompt "Enter the admin password" -AsSecureString
132132
$dnsLabelPrefix = Read-Host -Prompt "Enter the DNS label prefix"
133+
$resourceGroupName = "${projectName}rg"
133134

134135
New-AzResourceGroup -Name $resourceGroupName -Location "$location"
135136
New-AzResourceGroupDeployment `
@@ -144,8 +145,11 @@ There are many methods for deploying templates. In this tutorial, you use Cloud
144145
1. Run the following PowerShell command to list the newly created virtual machine:
145146

146147
```azurepowershell
147-
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name"
148-
Get-AzVM -Name SimpleWinVM -ResourceGroupName $resourceGroupName
148+
$projectName = Read-Host -Prompt "Enter a project name that is used to generate resource group name"
149+
$resourceGroupName = "${projectName}rg"
150+
$vmName = "SimpleWinVM"
151+
152+
Get-AzVM -Name $vmName -ResourceGroupName $resourceGroupName
149153
Write-Host "Press [ENTER] to continue ..."
150154
```
151155

0 commit comments

Comments
 (0)