Skip to content

Commit da7c503

Browse files
Merge pull request #242579 from mumian/0622-experimental
change resources object to resource array
2 parents acedfb9 + fb1dc39 commit da7c503

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

articles/azure-resource-manager/templates/conditional-resource-deployment.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Conditional deployment with templates
33
description: Describes how to conditionally deploy a resource in an Azure Resource Manager template (ARM template).
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 05/22/2023
6+
ms.date: 06/22/2023
77
---
88

99
# Conditional deployment in ARM templates
@@ -69,8 +69,8 @@ You can use conditional deployment to create a new resource or use an existing o
6969
]
7070
}
7171
},
72-
"resources": {
73-
"saNew": {
72+
"resources": [
73+
{
7474
"condition": "[equals(parameters('newOrExisting'), 'new')]",
7575
"type": "Microsoft.Storage/storageAccounts",
7676
"apiVersion": "2022-09-01",
@@ -81,14 +81,13 @@ You can use conditional deployment to create a new resource or use an existing o
8181
},
8282
"kind": "StorageV2"
8383
},
84-
"saExisting": {
84+
{
8585
"condition": "[equals(parameters('newOrExisting'), 'existing')]",
86-
"existing": true,
8786
"type": "Microsoft.Storage/storageAccounts",
8887
"apiVersion": "2022-09-01",
8988
"name": "[parameters('storageAccountName')]"
9089
}
91-
},
90+
],
9291
"outputs": {
9392
"storageAccountId": {
9493
"type": "string",

articles/azure-resource-manager/templates/key-vault-parameter.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Key Vault secret with template
33
description: Shows how to pass a secret from a key vault as a parameter during deployment.
44
ms.topic: conceptual
5-
ms.date: 05/22/2023
5+
ms.date: 06/22/2023
66
ms.custom: devx-track-azurepowershell, devx-track-azurecli
77
---
88

@@ -185,8 +185,8 @@ The following template deploys a SQL server that includes an administrator passw
185185
"type": "securestring"
186186
}
187187
},
188-
"resources": {
189-
"sqlServer": {
188+
"resources": [
189+
{
190190
"type": "Microsoft.Sql/servers",
191191
"apiVersion": "2021-11-01",
192192
"name": "[parameters('sqlServerName')]",
@@ -197,7 +197,7 @@ The following template deploys a SQL server that includes an administrator passw
197197
"version": "12.0"
198198
}
199199
}
200-
}
200+
]
201201
}
202202
```
203203

articles/azure-resource-manager/templates/template-expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Template syntax and expressions
33
description: Describes the declarative JSON syntax for Azure Resource Manager templates (ARM templates).
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 02/22/2023
6+
ms.date: 06/22/2023
77
---
88

99
# Syntax and expressions in ARM templates
@@ -168,7 +168,7 @@ To totally remove an element, you can use the [filter() function](./template-fun
168168
}
169169
]
170170
},
171-
"resources": {},
171+
"resources": [],
172172
"outputs": {
173173
"backendAddressPools": {
174174
"type": "array",

articles/azure-resource-manager/templates/template-functions-cidr.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following example parses an IPv4 CIDR string:
3939
{
4040
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
4141
"contentVersion": "1.0.0.0",
42-
"resources": {},
42+
"resources": [],
4343
"outputs": {
4444
"v4info": {
4545
"type": "object",
@@ -68,7 +68,7 @@ The following example parses an IPv6 CIDR string:
6868
{
6969
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
7070
"contentVersion": "1.0.0.0",
71-
"resources": {},
71+
"resources": [],
7272
"outputs": {
7373
"v6info": {
7474
"type": "object",
@@ -118,7 +118,7 @@ The following example calculates the first five /24 subnet ranges from the speci
118118
{
119119
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
120120
"contentVersion": "1.0.0.0",
121-
"resources": {},
121+
"resources": [],
122122
"outputs": {
123123
"v4subnets": {
124124
"type": "array",
@@ -149,7 +149,7 @@ The following example calculates the first five /52 subnet ranges from the speci
149149
{
150150
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
151151
"contentVersion": "1.0.0.0",
152-
"resources": {},
152+
"resources": [],
153153
"outputs": {
154154
"v6subnets": {
155155
"type": "array",
@@ -201,7 +201,7 @@ The following example calculates the first five usable host IP addresses from th
201201
{
202202
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
203203
"contentVersion": "1.0.0.0",
204-
"resources": {},
204+
"resources": [],
205205
"outputs": {
206206
"v4hosts": {
207207
"type": "array",
@@ -232,7 +232,7 @@ The following example calculates the first five usable host IP addresses from th
232232
{
233233
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
234234
"contentVersion": "1.0.0.0",
235-
"resources": {},
235+
"resources": [],
236236
"outputs": {
237237
"v6hosts": {
238238
"type": "array",

articles/azure-resource-manager/templates/template-functions-lambda.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Template functions - lambda
33
description: Describes the lambda functions to use in an Azure Resource Manager template (ARM template)
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 05/22/2023
6+
ms.date: 06/22/2023
77
---
88

99
# Lambda functions for ARM templates
@@ -87,7 +87,7 @@ The following examples show how to use the `filter` function.
8787
}
8888
]
8989
},
90-
"resources": {},
90+
"resources": [],
9191
"outputs": {
9292
"oldDogs": {
9393
"type": "array",
@@ -116,7 +116,7 @@ The output from the preceding example shows the dogs that are five or older:
116116
}
117117
]
118118
},
119-
"resources": {},
119+
"resources": [],
120120
"outputs": {
121121
"filteredLoop": {
122122
"type": "array",
@@ -199,7 +199,7 @@ The following example shows how to use the `map` function.
199199
}
200200
]
201201
},
202-
"resources": {},
202+
"resources": [],
203203
"outputs": {
204204
"dogNames": {
205205
"type": "array",
@@ -289,7 +289,7 @@ The following examples show how to use the `reduce` function.
289289
],
290290
"ages": "[map(variables('dogs'), lambda('dog', lambdaVariables('dog').age))]"
291291
},
292-
"resources": {},
292+
"resources": [],
293293
"outputs": {
294294
"totalAge": {
295295
"type": "int",
@@ -316,7 +316,7 @@ The output from the preceding example is:
316316
{
317317
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
318318
"contentVersion": "1.0.0.0",
319-
"resources": {},
319+
"resources": [],
320320
"outputs": {
321321
"reduceObjectUnion": {
322322
"type": "object",
@@ -394,7 +394,7 @@ The following example shows how to use the `sort` function.
394394
}
395395
]
396396
},
397-
"resources": {},
397+
"resources": [],
398398
"outputs": {
399399
"dogsByAge": {
400400
"type": "array",
@@ -471,7 +471,7 @@ The following example shows how to use the `toObject` function with the two requ
471471
}
472472
]
473473
},
474-
"resources": {},
474+
"resources": [],
475475
"outputs": {
476476
"dogsObject": {
477477
"type": "object",
@@ -545,7 +545,7 @@ The following example shows how to use the `toObject` function with three parame
545545
}
546546
]
547547
},
548-
"resources": {},
548+
"resources": [],
549549
"outputs": {
550550
"dogsObject": {
551551
"type": "object",

0 commit comments

Comments
 (0)