|
2 | 2 | title: Use template reference
|
3 | 3 | description: Use the Azure Resource Manager template (ARM template) reference to create a template.
|
4 | 4 | author: mumian
|
5 |
| -ms.date: 04/23/2020 |
| 5 | +ms.date: 02/11/2022 |
6 | 6 | ms.topic: tutorial
|
7 | 7 | ms.author: jgao
|
8 |
| -ms.custom: seodec18 |
9 | 8 | ---
|
10 | 9 |
|
11 | 10 | # Tutorial: Utilize the ARM template reference
|
12 | 11 |
|
13 | 12 | Learn how to find the template schema information, and use the information to create Azure Resource Manager templates (ARM templates).
|
14 | 13 |
|
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. |
16 | 15 |
|
17 | 16 | 
|
18 | 17 |
|
@@ -55,46 +54,36 @@ To complete this article, you need:
|
55 | 54 |
|
56 | 55 | * `$schema`: specify the location of the JSON schema file that describes the version of the template language.
|
57 | 56 | * `contentVersion`: specify any value for this element to document significant changes in your template.
|
| 57 | + * `metadata`: specify the metadata of the template. |
58 | 58 | * `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. |
60 | 60 | * `resources`: specify the resource types that are deployed or updated in a resource group.
|
61 | 61 | * `outputs`: specify the values that are returned after deployment.
|
62 | 62 |
|
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`. |
64 | 64 |
|
65 | 65 | 
|
66 | 66 |
|
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. |
69 | 68 | 
|
70 | 69 |
|
| 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 | + |
71 | 72 | ## Find the template reference
|
72 | 73 |
|
73 | 74 | 1. Browse to [Azure Template reference](/azure/templates/).
|
74 | 75 | 1. In the **Filter by title** box, enter **storage accounts**, and select the first **Storage Accounts** under **Reference > Storage**.
|
75 | 76 |
|
76 | 77 | 
|
77 | 78 |
|
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. |
79 | 80 |
|
80 | 81 | 
|
81 | 82 |
|
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 |
| -  |
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. |
89 | 84 |
|
90 | 85 | 
|
91 | 86 |
|
92 |
| -## Edit the template |
93 |
| - |
94 |
| -From Visual Studio Code, add the additional storage account types as shown in the following screenshot: |
95 |
| - |
96 |
| - |
97 |
| - |
98 | 87 | ## Deploy the template
|
99 | 88 |
|
100 | 89 | 1. Sign in to the [Azure Cloud Shell](https://shell.azure.com)
|
|
0 commit comments