Skip to content

Commit 0b8a9e4

Browse files
committed
add select-azsubscription
1 parent f7c155b commit 0b8a9e4

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

articles/azure-resource-manager/templates/template-tutorial-create-first-template.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Tutorial - Create & deploy template
33
description: Create your first Azure Resource Manager template. In the tutorial, you learn about the template file syntax and how to deploy a storage account.
44
author: mumian
5-
ms.date: 03/27/2020
5+
ms.date: 05/12/2020
66
ms.topic: tutorial
77
ms.author: jgao
88

@@ -90,6 +90,24 @@ az login
9090
```
9191

9292
---
93+
94+
If you have multiple Azure subscriptions, select the subscription you want to use:
95+
96+
# [PowerShell](#tab/azure-powershell)
97+
98+
```azurepowershell
99+
Select-AzSubscription [SubscriptionID/SubscriptionName]
100+
```
101+
102+
# [Azure CLI](#tab/azure-cli)
103+
104+
```azurecli
105+
az account set --subscription [SubscriptionID/SubscriptionName]
106+
```
107+
108+
---
109+
110+
93111
## Create resource group
94112

95113
When you deploy a template, you specify a resource group that will contain the resources. Before running the deployment command, create the resource group with either Azure CLI or Azure PowerShell. Select the tabs in the following code section to choose between Azure PowerShell and Azure CLI. The CLI examples in this article are written for the Bash shell.
@@ -123,7 +141,7 @@ $templateFile = "{provide-the-path-to-the-template-file}"
123141
New-AzResourceGroupDeployment `
124142
-Name blanktemplate `
125143
-ResourceGroupName myResourceGroup `
126-
-TemplateFile $templateFile
144+
-TemplateFile $templateFile
127145
```
128146

129147
# [Azure CLI](#tab/azure-cli)

0 commit comments

Comments
 (0)