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/resource-group-authoring-templates.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Describes the structure and properties of Azure Resource Manager te
4
4
author: tfitzmac
5
5
ms.service: azure-resource-manager
6
6
ms.topic: conceptual
7
-
ms.date: 08/29/2019
7
+
ms.date: 09/13/2019
8
8
ms.author: tomfitz
9
9
---
10
10
@@ -79,6 +79,8 @@ The available properties for a parameter are:
79
79
| maxLength |No |The maximum length for string, secure string, and array type parameters, this value is inclusive. |
80
80
| description |No |Description of the parameter that is displayed to users through the portal. For more information, see [Comments in templates](#comments). |
81
81
82
+
For examples of how to use parameters, see [Parameters in Azure Resource Manager templates](template-parameters.md).
83
+
82
84
## Variables
83
85
84
86
In the variables section, you construct values that can be used throughout your template. You don't need to define variables, but they often simplify your template by reducing complex expressions.
@@ -112,6 +114,8 @@ The following example shows the available options for defining a variable:
112
114
113
115
For information about using `copy` to create several values for a variable, see [Variable iteration](resource-group-create-multiple.md#variable-iteration).
114
116
117
+
For examples of how to use variables, see [Variables in Azure Resource Manager template](template-variables.md).
118
+
115
119
## Functions
116
120
117
121
Within your template, you can create your own functions. These functions are available for use in your template. Typically, you define complicated expression that you don't want to repeat throughout your template. You create the user-defined functions from expressions and [functions](resource-group-template-functions.md) that are supported in templates.
@@ -155,6 +159,8 @@ When defining a user function, there are some restrictions:
155
159
| output-type |Yes |Type of the output value. Output values support the same types as function input parameters. |
156
160
| output-value |Yes |Template language expression that is evaluated and returned from the function. |
157
161
162
+
For examples of how to use custom functions, see [User-defined functions in Azure Resource Manager template](template-user-defined-functions.md).
163
+
158
164
## Resources
159
165
160
166
In the resources section, you define the resources that are deployed or updated.
@@ -255,6 +261,8 @@ The following example shows the structure of an output definition:
255
261
| type |Yes |Type of the output value. Output values support the same types as template input parameters. If you specify **securestring** for the output type, the value isn't displayed in the deployment history and can't be retrieved from another template. To use a secret value in more than one template, store the secret in a Key Vault and reference the secret in the parameter file. For more information, see [Use Azure Key Vault to pass secure parameter value during deployment](resource-manager-keyvault-parameter.md). |
256
262
| value |Yes |Template language expression that is evaluated and returned as output value. |
257
263
264
+
For examples of how to use outputs, see [Outputs in Azure Resource Manager template](template-outputs.md).
@@ -131,18 +129,6 @@ The preceding example returns the following object:
131
129
}
132
130
```
133
131
134
-
To deploy this example template with Azure CLI, use:
135
-
136
-
```azurecli-interactive
137
-
az group deployment create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/deployment.json
138
-
```
139
-
140
-
To deploy this example template with PowerShell, use:
For a subscription-level template that uses the deployment function, see [subscription deployment function](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/functions/deploymentsubscription.json). It's deployed with either `az deployment create` or `New-AzDeployment` commands.
147
133
148
134
<aid="parameters" />
@@ -249,17 +235,7 @@ The output from the preceding example with the default values is:
249
235
| arrayOutput | Array |[1, 2, 3]|
250
236
| crossOutput | String | option 1 |
251
237
252
-
To deploy this example template with Azure CLI, use:
253
-
254
-
```azurecli-interactive
255
-
az group deployment create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/parameters.json
256
-
```
257
-
258
-
To deploy this example template with PowerShell, use:
To deploy this example template with Azure CLI, use:
355
-
356
-
```azurecli-interactive
357
-
az group deployment create -g functionexamplegroup --template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/functions/variables.json
358
-
```
359
-
360
-
To deploy this example template with PowerShell, use:
For more information about using variables, see [Variables in Azure Resource Manager template](template-variables.md).
365
331
366
332
## Next steps
367
333
* For a description of the sections in an Azure Resource Manager template, see [Authoring Azure Resource Manager templates](resource-group-authoring-templates.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/resource-manager-parameter-files.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,6 +199,6 @@ If your template includes a parameter with the same name as one of the parameter
199
199
200
200
## Next steps
201
201
202
-
- To understand how to define parameters in your template, see [Understand the structure and syntax of Azure Resource Manager templates](resource-group-authoring-templates.md).
202
+
- To understand how to define parameters in your template, see [Parameters in Azure Resource Manager templates](template-parameters.md).
203
203
- For more information about using values from a key vault, see [Use Azure Key Vault to pass secure parameter value during deployment](resource-manager-keyvault-parameter.md).
204
-
204
+
- For more information about parameters, see [Parameters in Azure Resource Manager templates](template-parameters.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/template-best-practices.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,10 @@
1
1
---
2
2
title: Best practices for Azure Resource Manager templates
3
3
description: Describes recommended approaches for authoring Azure Resource Manager templates. Offers suggestions to avoid common problems when using templates.
4
-
services: azure-resource-manager
5
-
documentationcenter: na
6
4
author: tfitzmac
7
5
ms.service: azure-resource-manager
8
-
ms.devlang: na
9
6
ms.topic: conceptual
10
-
ms.tgt_pltfrm: na
11
-
ms.workload: na
12
-
ms.date: 08/16/2019
7
+
ms.date: 09/12/2019
13
8
ms.author: tomfitz
14
9
---
15
10
# Azure Resource Manager template best practices
@@ -41,7 +36,8 @@ When you deploy resources to a resource group, the resource group stores metadat
41
36
If the resource group's region is temporarily unavailable, you can't update resources in the resource group because the metadata is unavailable. The resources in other regions will still function as expected, but you can't update them. To minimize risk, locate your resource group and resources in the same region.
42
37
43
38
## Parameters
44
-
The information in this section can be helpful when you work with [parameters](resource-group-authoring-templates.md#parameters).
39
+
40
+
The information in this section can be helpful when you work with [parameters](template-parameters.md).
45
41
46
42
### General recommendations for parameters
47
43
@@ -143,7 +139,7 @@ The information in this section can be helpful when you work with [parameters](r
143
139
144
140
## Variables
145
141
146
-
The following information can be helpful when you work with [variables](resource-group-authoring-templates.md#variables):
142
+
The following information can be helpful when you work with [variables](template-variables.md):
147
143
148
144
* Use camel case for variable names.
149
145
@@ -280,7 +276,7 @@ The following information can be helpful when you work with [resources](resource
280
276
281
277
## Outputs
282
278
283
-
If you use a template to create public IP addresses, include an [outputs section](resource-group-authoring-templates.md#outputs) that returns details of the IP address and the fully qualified domain name (FQDN). You can use output values to easily retrieve details about public IP addresses and FQDNs after deployment.
279
+
If you use a template to create public IP addresses, include an [outputs section](template-outputs.md) that returns details of the IP address and the fully qualified domain name (FQDN). You can use output values to easily retrieve details about public IP addresses and FQDNs after deployment.
0 commit comments