2
2
title : Create multiple resource instances
3
3
description : Learn how to create an Azure Resource Manager template to create multiple Azure resource instances.
4
4
author : mumian
5
- ms.date : 03/ 04/2019
5
+ ms.date : 04/08/2020
6
6
ms.topic : tutorial
7
7
ms.author : jgao
8
8
---
@@ -59,7 +59,7 @@ The completed template looks like:
59
59
60
60
```json
61
61
{
62
- "$schema": "https://schema.management.azure.com/schemas/2015-01 -01/deploymentTemplate.json#",
62
+ "$schema": "https://schema.management.azure.com/schemas/2019-04 -01/deploymentTemplate.json#",
63
63
"contentVersion": "1.0.0.0",
64
64
"parameters": {
65
65
"storageAccountType": {
@@ -86,18 +86,18 @@ The completed template looks like:
86
86
"resources": [
87
87
{
88
88
"type": "Microsoft.Storage/storageAccounts",
89
+ "apiVersion": "2019-04-01",
89
90
"name": "[concat(copyIndex(),' storage' , uniqueString(resourceGroup().id))]",
90
- "apiVersion": "2018-02-01",
91
91
"location": "[parameters(' location' )]",
92
92
"sku": {
93
93
"name": "[parameters(' storageAccountType' )]"
94
94
},
95
- "kind": "Storage",
96
- "properties": {},
95
+ "kind": "StorageV2",
97
96
"copy": {
98
97
"name": "storagecopy",
99
98
"count": 3
100
- }
99
+ },
100
+ "properties": {}
101
101
}
102
102
]
103
103
}
@@ -114,16 +114,19 @@ Refer to the [Deploy the template](quickstart-create-templates-use-visual-studio
114
114
To list all three storage accounts, omit the --name parameter:
115
115
116
116
# [Azure CLI](#tab/azure-cli)
117
+
117
118
```azurecli
118
- echo "Enter the Resource Group name:" &&
119
- read resourceGroupName &&
119
+ echo "Enter a project name that is used to generate resource group name:" &&
120
+ read projectName &&
121
+ resourceGroupName="${projectName}rg" &&
120
122
az storage account list --resource-group $resourceGroupName
121
123
```
122
124
123
125
# [PowerShell](#tab/azure-powershell)
124
126
125
127
```azurepowershell
126
- $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"
129
+ $resourceGroupName = "${projectName}rg"
127
130
Get-AzStorageAccount -ResourceGroupName $resourceGroupName
128
131
```
129
132
0 commit comments