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-manager-parameter-files.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ For more information about using values from a key vault, see [Use Azure Key Vau
59
59
60
60
## Define parameter values
61
61
62
-
To figure out how to define the parameter values, you need to open the template you are deploying. Look at the parameters section of the template. The following example shows the parameters from a template.
62
+
To figure out how to define the parameter values, open the template you're deploying. Look at the parameters section of the template. The following example shows the parameters from a template.
63
63
64
64
```json
65
65
"parameters": {
@@ -95,7 +95,7 @@ The first detail to notice is the name of each parameter. The values in your par
95
95
}
96
96
```
97
97
98
-
Then, notice the type of the parameter. The values in your parameter file must have the same types. For this template, you can provide two parameters that are both strings.
98
+
Notice the type of the parameter. The values in your parameter file must have the same types. For this template, you can provide both parameters as strings.
99
99
100
100
```json
101
101
{
@@ -146,9 +146,7 @@ Finally, look at the allowed values and any restrictions like max length. They t
146
146
}
147
147
```
148
148
149
-
You can create more than one parameter file, and then pass in the appropriate parameter file for the scenario.
150
-
151
-
## Parameter formats
149
+
## Parameter type formats
152
150
153
151
The following example shows the formats of different parameter types.
154
152
@@ -182,6 +180,13 @@ The following example shows the formats of different parameter types.
182
180
}
183
181
```
184
182
183
+
## File name
184
+
185
+
The general convention for naming the parameter file is to add **.parameters** to the template name. For example, if your template is named **azuredeploy.json**, your parameter file is named **azuredeploy.parameters.json**. This naming convention helps you see the connection between the template and the parameters.
186
+
187
+
To deploy to different environments, create more than one parameter file. When naming the parameter file, add a way to identify its use. For example, use **azuredeploy.parameters-dev.json** and **azuredeploy.parameters-prod.json**
188
+
189
+
185
190
## Parameter precedence
186
191
187
192
You can use inline parameters and a local parameter file in the same deployment operation. For example, you can specify some values in the local parameter file and add other values inline during deployment. If you provide values for a parameter in both the local parameter file and inline, the inline value takes precedence.
@@ -190,7 +195,7 @@ However, when you use an external parameter file, you can't pass other values ei
190
195
191
196
## Parameter name conflicts
192
197
193
-
If your template includes a parameter with the same name as one of the parameters in the PowerShell command, PowerShell presents the parameter from your template with the postfix **FromTemplate**. For example, a parameter named **ResourceGroupName** in your template conflicts with the **ResourceGroupName** parameter in the [New-AzResourceGroupDeployment](/powershell/module/az.resources/new-azresourcegroupdeployment) cmdlet. You're prompted to provide a value for **ResourceGroupNameFromTemplate**. In general, you should avoid this confusion by not naming parameters with the same name as parameters used for deployment operations.
198
+
If your template includes a parameter with the same name as one of the parameters in the PowerShell command, PowerShell presents the parameter from your template with the postfix **FromTemplate**. For example, a parameter named **ResourceGroupName** in your template conflicts with the **ResourceGroupName** parameter in the [New-AzResourceGroupDeployment](/powershell/module/az.resources/new-azresourcegroupdeployment) cmdlet. You're prompted to provide a value for **ResourceGroupNameFromTemplate**. You can avoid this confusion by using parameter names that aren't used for deployment commands.
0 commit comments