Skip to content

Commit b0b1c75

Browse files
committed
update
1 parent 5213438 commit b0b1c75

File tree

2 files changed

+65
-9
lines changed

2 files changed

+65
-9
lines changed
-50.8 KB
Loading

articles/azure-resource-manager/templates/quickstart-create-template-specs.md

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,20 @@ The template spec is a resource type named `Microsoft.Resources/templateSpecs`.
218218
--template-file "C:\Templates\createTemplateSepc.json"
219219
```
220220
221+
1. Verify the deployment with Azure CLI or PowerShell.
222+
223+
```azurepowershell
224+
Get-AzTemplateSpec `
225+
-ResourceGroupName templateSpecRG `
226+
-Name storageSpec
227+
```
228+
229+
```azurecli
230+
az ts show \
231+
--resource-group templateSpecRG \
232+
--name storageSpec
233+
```
234+
221235
---
222236
223237
## Deploy template spec
@@ -312,7 +326,7 @@ To deploy a template spec, use the same deployment commands as you would use to
312326
313327
# [ARM Template](#tab/azure-resource-manager)
314328
315-
1. Copy the following template and save it locally to a file named **deployTemplateSpec.json**.
329+
1. Copy the following template and save it locally to a file named **C:\Templates\deployTemplateSpecV1.json**.
316330
317331
```json
318332
{
@@ -336,7 +350,7 @@ To deploy a template spec, use the same deployment commands as you would use to
336350
}
337351
```
338352
339-
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.
353+
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.
340354
341355
1. Use Azure CLI or PowerShell to create a new resource group for the storage account.
342356
@@ -357,13 +371,25 @@ To deploy a template spec, use the same deployment commands as you would use to
357371
```azurepowershell
358372
New-AzResourceGroupDeployment `
359373
-ResourceGroupName storageRG `
360-
-TemplateFile "C:\Templates\deployTemplateSpec.json"
374+
-TemplateFile "C:\Templates\deployTemplateSpecV1.json"
361375
```
362376
363377
```azurecli
364378
az deployment group create \
365379
--resource-group storageRG \
366-
--template-file "C:\Templates\deployTemplateSpec.json"
380+
--template-file "C:\Templates\deployTemplateSpecV1.json"
381+
```
382+
383+
1. Verify the deployment with Azure CLI or PowerShell.
384+
385+
```azurepowershell
386+
Get-AzResource `
387+
-ResourceGroupName storageRG
388+
```
389+
390+
```azurecli
391+
az resource list \
392+
--resource-group storageRG
367393
```
368394
369395
---
@@ -470,15 +496,16 @@ Instead of creating a new template spec for the revised template, add a new vers
470496

471497
# [Portal](#tab/azure-portal)
472498

473-
1. Open the template spec, select **Create new version**.
499+
1. Open the template spec **storageSpec**, select **Create new version**.
474500

475501
:::image type="content" source="./media/quickstart-create-template-specs/select-versions.png" alt-text="Screenshot of 'Create new version' button in Template spec details.":::
476502

503+
1. Select **1.0** as the base template, and then select **Create**.
477504
1. Name the new version `2.0` and optionally add notes. Select **Edit template**.
478505

479506
:::image type="content" source="./media/quickstart-create-template-specs/add-version-name.png" alt-text="Screenshot of naming the new version and selecting 'Edit template' button.":::
480507

481-
1. Replace the contents of the template with your updated template. Select **Review + Save**.
508+
1. Replace the contents of the template with the updated template. Select **Review + Save**.
482509
1. Select **Save changes**.
483510

484511
1. To deploy the new version, select **Versions**.
@@ -565,7 +592,23 @@ Instead of creating a new template spec for the revised template, add a new vers
565592
--template-file "C:\Templates\createTemplateSpec.json"
566593
```
567594

568-
1. Copy the following template and save it locally to a file named **storage.json**.
595+
1. verify the deployment with Azure CLI or PowerShell.
596+
597+
```azurepowershell
598+
Get-AzTemplateSpec `
599+
-ResourceGroupName templateSpecRG `
600+
-Name storageSpec
601+
```
602+
603+
```azurecli
604+
az ts show \
605+
--resource-group templateSpecRG \
606+
--name storageSpec
607+
```
608+
609+
You should see the new version `2.0` in the list of versions.
610+
611+
1. Copy the following template and save it locally to a file named **C:\Templates\deployTemplateSpecV2.json**.
569612

570613
```json
571614
{
@@ -594,15 +637,28 @@ Instead of creating a new template spec for the revised template, add a new vers
594637
```azurepowershell
595638
New-AzResourceGroupDeployment `
596639
-ResourceGroupName storageRG `
597-
-TemplateFile "C:\Templates\storage.json"
640+
-TemplateFile "C:\Templates\deployTemplateSpecV2.json"
598641
```
599642

600643
```azurecli
601644
az deployment group create \
602645
--resource-group storageRG \
603-
--template-file "C:\Templates\storage.json"
646+
--template-file "C:\Templates\deployTemplateSpecV2.json"
647+
```
648+
649+
1. Verify the deployment with Azure CLI or PowerShell.
650+
651+
```azurepowershell
652+
Get-AzResource `
653+
-ResourceGroupName storageRG
654+
```
655+
656+
```azurecli
657+
az resource list \
658+
--resource-group storageRG
604659
```
605660

661+
You should see the new storage account with a name that starts with `store` and a unique string based on the resource group ID.
606662
---
607663

608664
## Clean up resources

0 commit comments

Comments
 (0)