Skip to content

Commit 7ee2a2e

Browse files
committed
revised
1 parent 89bac18 commit 7ee2a2e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

articles/azure-resource-manager/resource-manager-parameter-files.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For more information about using values from a key vault, see [Use Azure Key Vau
5959

6060
## Define parameter values
6161

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.
6363

6464
```json
6565
"parameters": {
@@ -95,7 +95,7 @@ The first detail to notice is the name of each parameter. The values in your par
9595
}
9696
```
9797

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.
9999

100100
```json
101101
{
@@ -146,9 +146,7 @@ Finally, look at the allowed values and any restrictions like max length. They t
146146
}
147147
```
148148

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
152150

153151
The following example shows the formats of different parameter types.
154152

@@ -182,6 +180,13 @@ The following example shows the formats of different parameter types.
182180
}
183181
```
184182

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+
185190
## Parameter precedence
186191

187192
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
190195

191196
## Parameter name conflicts
192197

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.
194199

195200
## Next steps
196201

0 commit comments

Comments
 (0)