severity | pillar | category | resource | online version |
---|---|---|---|---|
Important |
Operational Excellence |
Release engineering |
All resources |
Configure a metadata link for each parameter file.
A parameter file can include an additional metadata. This metadata provides additional context for use of the parameter file.
PSRule for Azure uses the metadata.template
property within parameter files to store a metadata link.
A metadata link, is an explicit association between a parameter file it's intended template file.
This rule is disabled by default but can be enabled by configuring AZURE_PARAMETER_FILE_METADATA_LINK
.
Enable this rule to ensure that each parameter file has a metadata link to a valid template file.
Consider setting metadata for each parameter file linking to the deployment template.
To create parameter files that pass this rule:
- Set the
metadata.template
property to a valid template file path.
For example:
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"template": "templates/storage/v1/template.json"
},
"parameters": {
"storageAccountName": {
"value": "..."
}
}
}
Enable this rule by setting the AZURE_PARAMETER_FILE_METADATA_LINK
option to true
.