You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/quickstart-create-template-specs.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ An Azure account with an active subscription. [Create an account for free](https
23
23
24
24
## Create template
25
25
26
-
You create a template spec from an ARM template. Copy the following template and save as **c:\Templates\createStorage.json**.
26
+
You create a template spec from an ARM template. Copy the following template and save as **C:\Templates\createStorage.json**.
27
27
28
28
```json
29
29
{
@@ -79,7 +79,7 @@ The template spec is a resource type named `Microsoft.Resources/templateSpecs`.
79
79
-Version "1.0" `
80
80
-ResourceGroupName templateSpecRG `
81
81
-Location westus2 `
82
-
-TemplateFile "c:\Templates\createStorage.json"
82
+
-TemplateFile "C:\Templates\createStorage.json"
83
83
```
84
84
85
85
# [CLI](#tab/azure-cli)
@@ -100,7 +100,7 @@ The template spec is a resource type named `Microsoft.Resources/templateSpecs`.
100
100
--version "1.0" \
101
101
--resource-group templateSpecRG \
102
102
--location "westus2" \
103
-
--template-file "c:\Templates\createStorage.json"
103
+
--template-file "C:\Templates\createStorage.json"
104
104
```
105
105
106
106
# [Portal](#tab/azure-portal)
@@ -139,7 +139,7 @@ The template spec is a resource type named `Microsoft.Resources/templateSpecs`.
139
139
> [!NOTE]
140
140
> Instead of using an ARM template, we recommend that you use PowerShell or CLI to create your template spec. Those tools automatically convert linked templates to artifacts connected to your main template. When you use an ARM template to create the template spec, you must manually add those linked templates as artifacts, which can be complicated.
141
141
142
-
1. When you use an ARM template to create the template spec, the template is embedded in the resource definition. There are some changes you need to make to your local template. Copy the following template and save it locally as **createTemplateSpec.json**.
142
+
1. When you use an ARM template to create the template spec, the template is embedded in the resource definition. Copy the following template and save it locally as **createTemplateSpec.json**.
143
143
144
144
> [!NOTE]
145
145
> In the embedded template, all [template expressions](template-expressions.md) must be escaped with a second left bracket. Use `"[[` instead of `"[`. JSON arrays still use a single left bracket.
@@ -158,7 +158,7 @@ The template spec is a resource type named `Microsoft.Resources/templateSpecs`.
@@ -352,6 +352,8 @@ To deploy a template spec, use the same deployment commands as you would use to
352
352
}
353
353
```
354
354
355
+
In the template, **templateSpecRG** is the name of the resource group that contains the template spec, **storageSpec** is the name of the template spec, and **1.0** is the version of the template spec.
356
+
355
357
1. Use Azure CLI or PowerShell to create a new resource group for the storage account.
356
358
357
359
```azurepowershell
@@ -371,13 +373,13 @@ To deploy a template spec, use the same deployment commands as you would use to
371
373
```azurepowershell
372
374
New-AzResourceGroupDeployment `
373
375
-ResourceGroupName storageRG `
374
-
-TemplateFile "c:\Templates\storage.json"
376
+
-TemplateFile "C:\Templates\storage.json"
375
377
```
376
378
377
379
```azurecli
378
380
az deployment group create \
379
381
--resource-group storageRG \
380
-
--template-file "c:\Templates\storage.json"
382
+
--template-file "C:\Templates\storage.json"
381
383
```
382
384
383
385
---
@@ -388,7 +390,7 @@ To let other users in your organization deploy your template spec, grant them re
388
390
389
391
## Update template
390
392
391
-
To make a change to the template in your template spec, use the following template. This template is similar to your earlier template except it adds a prefix for the storage account name. Copy the following template and update your `createStorage.json` file.
393
+
To make a change to the template in your template spec, revise the template. The following template is similar to your earlier template except it adds a prefix for the storage account name. Copy the following template and update your `createStorage.json` file.
392
394
393
395
```json
394
396
{
@@ -436,7 +438,7 @@ Instead of creating a new template spec for the revised template, add a new vers
436
438
-Version "2.0" `
437
439
-ResourceGroupName templateSpecRG `
438
440
-Location westus2 `
439
-
-TemplateFile "c:\Templates\createStorage.json"
441
+
-TemplateFile "C:\Templates\createStorage.json"
440
442
```
441
443
442
444
1. To deploy the new version, get the resource ID for the `2.0` version.
@@ -464,7 +466,7 @@ Instead of creating a new template spec for the revised template, add a new vers
464
466
--version "2.0" \
465
467
--resource-group templateSpecRG \
466
468
--location "westus2" \
467
-
--template-file "c:\Templates\createStorage.json"
469
+
--template-file "C:\Templates\createStorage.json"
468
470
```
469
471
470
472
1. To deploy the new version, get the resource ID for the `2.0` version.
@@ -509,7 +511,7 @@ Instead of creating a new template spec for the revised template, add a new vers
509
511
510
512
# [ARM Template](#tab/azure-resource-manager)
511
513
512
-
1. Again, you must make some changes to your local template to make it work with template specs. Copy the following template and save it locally as azuredeploy.json.
514
+
1. Again, you must make some changes to your local template to make it work with template specs. Copy the following template and save it locally as **createTemplateSpec.json**.
513
515
514
516
```json
515
517
{
@@ -525,7 +527,7 @@ Instead of creating a new template spec for the revised template, add a new vers
0 commit comments