Skip to content

Specify a value for each parameter#

Operational Excellence · All resources · Rule · 2021_09 · Awareness

Specify a value for each parameter in template parameter files.

Description#

When defining a template parameter file:

  • Uou must specify a value for each parameter in the file.
  • If the parameter is optional, you can omit the parameter from the file.
  • If the parameter is required, you must specify a value for the parameter.

Recommendation#

Consider defining a value for each parameter in the template parameter file.

Examples#

Configure with Azure template#

To define Azure template parameter files that pass this rule:

  • Set a value for each parameter specified in the file.

For example:

Azure Template snippet
{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "parameter1": {
            "value": "value1"
        },
        "parameter2": {
            "value": []
        }
    }
}

Comments