Skip to content

Commit 201fafc

Browse files
authored
Merge pull request #188349 from mumian/0211-template-reference
update the template reference tutorial
2 parents c54a576 + 7b727fb commit 201fafc

9 files changed

+10
-21
lines changed
Loading
Loading
Loading
Loading

articles/azure-resource-manager/templates/template-tutorial-use-template-reference.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
title: Use template reference
33
description: Use the Azure Resource Manager template (ARM template) reference to create a template.
44
author: mumian
5-
ms.date: 04/23/2020
5+
ms.date: 02/11/2022
66
ms.topic: tutorial
77
ms.author: jgao
8-
ms.custom: seodec18
98
---
109

1110
# Tutorial: Utilize the ARM template reference
1211

1312
Learn how to find the template schema information, and use the information to create Azure Resource Manager templates (ARM templates).
1413

15-
In this tutorial, you use a base template from Azure Quickstart Templates. Using template reference documentation, you customize the template.
14+
In this tutorial, you use a base template from Azure Quickstart Templates. Using template reference documentation, you validate the template.
1615

1716
![Resource Manager template reference deploy storage account](./media/template-tutorial-use-template-reference/resource-manager-template-tutorial-deploy-storage-account.png)
1817

@@ -55,46 +54,36 @@ To complete this article, you need:
5554

5655
* `$schema`: specify the location of the JSON schema file that describes the version of the template language.
5756
* `contentVersion`: specify any value for this element to document significant changes in your template.
57+
* `metadata`: specify the metadata of the template.
5858
* `parameters`: specify the values that are provided when deployment is executed to customize resource deployment.
59-
* `variables`: specify the values that are used as JSON fragments in the template to simplify template language expressions.
59+
* `variables`: specify the values that are used as JSON fragments in the template to simplify template language expressions. This template doesn't contain this element.
6060
* `resources`: specify the resource types that are deployed or updated in a resource group.
6161
* `outputs`: specify the values that are returned after deployment.
6262
63-
1. Expand `resources`. There's a `Microsoft.Storage/storageAccounts` resource defined. The SKU name uses a parameter value. The parameter is called `storageAccountType`.
63+
1. Expand `resources`. There's a `Microsoft.Storage/storageAccounts` resource defined. The API version shown on the screenshot is **2021-06-01**. The SKU name uses a parameter value. The parameter is called `storageAccountType`.
6464

6565
![Resource Manager template storage account definition](./media/template-tutorial-use-template-reference/resource-manager-template-storage-resource.png)
6666

67-
1. Expand `parameters` to see how `storageAccountType` is defined. The parameter has four allowed values. You will find the other allowed values, and then revise the parameter definition.
68-
67+
1. Expand `parameters` to see how `storageAccountType` is defined. The parameter has eight allowed values.
6968
![Resource Manager template storage account resources skus](./media/template-tutorial-use-template-reference/resource-manager-template-storage-resources-skus-old.png)
7069

70+
Using the template reference, you can find out whether you are using the latest API version, and whether the parameter definition includes all the allowed values.
71+
7172
## Find the template reference
7273

7374
1. Browse to [Azure Template reference](/azure/templates/).
7475
1. In the **Filter by title** box, enter **storage accounts**, and select the first **Storage Accounts** under **Reference > Storage**.
7576

7677
![Resource Manager template reference storage account](./media/template-tutorial-use-template-reference/resource-manager-template-resources-reference-storage-accounts.png)
7778

78-
A resource provider usually has several API versions:
79+
1. A resource type usually has several API versions. This page shows the latest template schema version by default. Select the **Latest** dropdown box to see the versions. The latest version shown on the screenshot is **2021-06-01**. Select either **Latest** or the version right beneath **Latest** to see the latest version. Make sure this version matches the version used for the storage account resource in your template. If you update the API version, verify the resource definition matches the template reference.
7980

8081
![Resource Manager template reference storage account versions](./media/template-tutorial-use-template-reference/resource-manager-template-resources-reference-storage-accounts-versions.png)
8182

82-
1. Select **All resources** under **Storage** from the left pane. This page lists the resource types and versions of the storage resource provider. It's recommended to use the latest API versions for the resource types defined in your template.
83-
84-
![Resource Manager template reference storage account types versions](./media/template-tutorial-use-template-reference/resource-manager-template-resources-reference-storage-accounts-types-versions.png)
85-
86-
1. Select the latest version of the `storageAccount` resource type. The latest version is **2019-06-01** when this article is written. Make sure this version matches the version used for the storage account resource in your template. If you update the API version, verify the resource definition matches the template reference.
87-
88-
1. This page lists the details of the storageAccount resource type. For example, it lists the allowed values for the **Sku object**. There are more SKUs than what is listed in the quickstart template that you opened earlier. You can customize the quickstart template to include all the available storage types.
83+
1. This page lists the details of the storageAccount resource type. For example, it lists the allowed values for the **Sku** object. There are eight SKUs, and they match the ones listed in the quickstart template that you opened earlier.
8984

9085
![Resource Manager template reference storage account skus](./media/template-tutorial-use-template-reference/resource-manager-template-resources-reference-storage-accounts-skus.png)
9186

92-
## Edit the template
93-
94-
From Visual Studio Code, add the additional storage account types as shown in the following screenshot:
95-
96-
![Resource Manager template storage account resources](./media/template-tutorial-use-template-reference/resource-manager-template-storage-resources-skus.png)
97-
9887
## Deploy the template
9988

10089
1. Sign in to the [Azure Cloud Shell](https://shell.azure.com)

0 commit comments

Comments
 (0)