Skip to content

Commit 79b2d92

Browse files
Merge pull request #238943 from mumian/0522-arm-freshness3
0522 arm freshness3
2 parents 4cfd82e + 79e7a4a commit 79b2d92

14 files changed

+60
-50
lines changed

articles/azure-resource-manager/templates/copy-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Define multiple instances of a variable
33
description: Use copy operation in an Azure Resource Manager template (ARM template) to iterate multiple times when creating a variable.
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 02/13/2020
6+
ms.date: 05/23/2023
77
---
88
# Variable iteration in ARM templates
99

articles/azure-resource-manager/templates/deploy-cloud-shell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Deploy templates with Cloud Shell
33
description: Use Azure Resource Manager and Azure Cloud Shell to deploy resources to Azure. The resources are defined in an Azure Resource Manager template (ARM template).
44
ms.topic: conceptual
55
ms.custom: devx-track-arm-template
6-
ms.date: 09/03/2021
6+
ms.date: 05/23/2023
77
---
88

99
# Deploy ARM templates from Azure Cloud Shell

articles/azure-resource-manager/templates/deploy-to-management-group.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deploy resources to management group
33
description: Describes how to deploy resources at the management group scope in an Azure Resource Manager template.
44
ms.topic: conceptual
5-
ms.date: 01/19/2022
5+
ms.date: 05/22/2023
66
ms.custom: devx-track-azurepowershell, devx-track-azurecli, devx-track-arm-template
77
---
88

articles/azure-resource-manager/templates/deployment-script-template-configure-dev.md

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configure development environment for deployment scripts in templates | Microsoft Docs
33
description: Configure development environment for deployment scripts in Azure Resource Manager templates (ARM templates).
44
ms.topic: conceptual
5-
ms.date: 12/14/2020
5+
ms.date: 05/23/2023
66
ms.custom: devx-track-azurepowershell, devx-track-azurecli, devx-track-arm-template
77
ms.devlang: azurecli
88
---
@@ -62,6 +62,13 @@ The following Azure Resource Manager template (ARM template) creates a container
6262
"description": "Specify a project name that is used for generating resource names."
6363
}
6464
},
65+
"location": {
66+
"type": "string",
67+
"defaultValue": "[resourceGroup().location]",
68+
"metadata": {
69+
"description": "Specify the resource location."
70+
}
71+
},
6572
"containerImage": {
6673
"type": "string",
6774
"defaultValue": "mcr.microsoft.com/azuredeploymentscripts-powershell:az9.7",
@@ -78,20 +85,19 @@ The following Azure Resource Manager template (ARM template) creates a container
7885
}
7986
},
8087
"variables": {
81-
"storageAccountName": "[tolower(concat(parameters('projectName'), 'store'))]",
82-
"fileShareName": "[concat(parameters('projectName'), 'share')]",
83-
"containerGroupName": "[concat(parameters('projectName'), 'cg')]",
84-
"containerName": "[concat(parameters('projectName'), 'container')]"
88+
"storageAccountName": "[toLower(format('{0}store', parameters('projectName')))]",
89+
"fileShareName": "[format('{0}share', parameters('projectName'))]",
90+
"containerGroupName": "[format('{0}cg', parameters('projectName'))]",
91+
"containerName": "[format('{0}container', parameters('projectName'))]"
8592
},
8693
"resources": [
8794
{
8895
"type": "Microsoft.Storage/storageAccounts",
89-
"apiVersion": "2019-06-01",
96+
"apiVersion": "2022-09-01",
9097
"name": "[variables('storageAccountName')]",
91-
"location": "[resourceGroup().location]",
98+
"location": "[parameters('location')]",
9299
"sku": {
93-
"name": "Standard_LRS",
94-
"tier": "Standard"
100+
"name": "Standard_LRS"
95101
},
96102
"kind": "StorageV2",
97103
"properties": {
@@ -100,20 +106,17 @@ The following Azure Resource Manager template (ARM template) creates a container
100106
},
101107
{
102108
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
103-
"apiVersion": "2019-06-01",
104-
"name": "[concat(variables('storageAccountName'), '/default/', variables('fileShareName'))]",
109+
"apiVersion": "2022-09-01",
110+
"name": "[format('{0}/default/{1}', variables('storageAccountName'), variables('fileShareName'))]",
105111
"dependsOn": [
106112
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
107113
]
108114
},
109115
{
110116
"type": "Microsoft.ContainerInstance/containerGroups",
111-
"apiVersion": "2019-12-01",
117+
"apiVersion": "2023-05-01",
112118
"name": "[variables('containerGroupName')]",
113-
"location": "[resourceGroup().location]",
114-
"dependsOn": [
115-
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
116-
],
119+
"location": "[parameters('location')]",
117120
"properties": {
118121
"containers": [
119122
{
@@ -123,7 +126,7 @@ The following Azure Resource Manager template (ARM template) creates a container
123126
"resources": {
124127
"requests": {
125128
"cpu": 1,
126-
"memoryInGb": 1.5
129+
"memoryInGB": "[json('1.5')]"
127130
}
128131
},
129132
"ports": [
@@ -154,11 +157,14 @@ The following Azure Resource Manager template (ARM template) creates a container
154157
"readOnly": false,
155158
"shareName": "[variables('fileShareName')]",
156159
"storageAccountName": "[variables('storageAccountName')]",
157-
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value]"
160+
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2022-09-01').keys[0].value]"
158161
}
159162
}
160163
]
161-
}
164+
},
165+
"dependsOn": [
166+
"storageAccount"
167+
]
162168
}
163169
]
164170
}
@@ -243,6 +249,13 @@ The following ARM template creates a container instance and a file share, and th
243249
"description": "Specify a project name that is used for generating resource names."
244250
}
245251
},
252+
"location": {
253+
"type": "string",
254+
"defaultValue": "[resourceGroup().location]",
255+
"metadata": {
256+
"description": "Specify the resource location."
257+
}
258+
},
246259
"containerImage": {
247260
"type": "string",
248261
"defaultValue": "mcr.microsoft.com/azure-cli:2.9.1",
@@ -259,20 +272,19 @@ The following ARM template creates a container instance and a file share, and th
259272
}
260273
},
261274
"variables": {
262-
"storageAccountName": "[tolower(concat(parameters('projectName'), 'store'))]",
263-
"fileShareName": "[concat(parameters('projectName'), 'share')]",
264-
"containerGroupName": "[concat(parameters('projectName'), 'cg')]",
265-
"containerName": "[concat(parameters('projectName'), 'container')]"
275+
"storageAccountName": "[toLower(format('{0}store', parameters('projectName')))]",
276+
"fileShareName": "[format('{0}share', parameters('projectName'))]",
277+
"containerGroupName": "[format('{0}cg', parameters('projectName'))]",
278+
"containerName": "[format('{0}container', parameters('projectName'))]"
266279
},
267280
"resources": [
268281
{
269282
"type": "Microsoft.Storage/storageAccounts",
270-
"apiVersion": "2019-06-01",
283+
"apiVersion": "2022-09-01",
271284
"name": "[variables('storageAccountName')]",
272-
"location": "[resourceGroup().location]",
285+
"location": "[parameters('location')]",
273286
"sku": {
274-
"name": "Standard_LRS",
275-
"tier": "Standard"
287+
"name": "Standard_LRS"
276288
},
277289
"kind": "StorageV2",
278290
"properties": {
@@ -281,20 +293,17 @@ The following ARM template creates a container instance and a file share, and th
281293
},
282294
{
283295
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
284-
"apiVersion": "2019-06-01",
285-
"name": "[concat(variables('storageAccountName'), '/default/', variables('fileShareName'))]",
296+
"apiVersion": "2022-09-01",
297+
"name": "[format('{0}/default/{1}', variables('storageAccountName'), variables('fileShareName'))]",
286298
"dependsOn": [
287299
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
288300
]
289301
},
290302
{
291303
"type": "Microsoft.ContainerInstance/containerGroups",
292-
"apiVersion": "2019-12-01",
304+
"apiVersion": "2023-05-01",
293305
"name": "[variables('containerGroupName')]",
294-
"location": "[resourceGroup().location]",
295-
"dependsOn": [
296-
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
297-
],
306+
"location": "[parameters('location')]",
298307
"properties": {
299308
"containers": [
300309
{
@@ -304,7 +313,7 @@ The following ARM template creates a container instance and a file share, and th
304313
"resources": {
305314
"requests": {
306315
"cpu": 1,
307-
"memoryInGb": 1.5
316+
"memoryInGB": "[json('1.5')]"
308317
}
309318
},
310319
"ports": [
@@ -335,11 +344,14 @@ The following ARM template creates a container instance and a file share, and th
335344
"readOnly": false,
336345
"shareName": "[variables('fileShareName')]",
337346
"storageAccountName": "[variables('storageAccountName')]",
338-
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value]"
347+
"storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2022-09-01').keys[0].value]"
339348
}
340349
}
341350
]
342-
}
351+
},
352+
"dependsOn": [
353+
"storageAccount"
354+
]
343355
}
344356
]
345357
}
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)