Use comments for each ARM template resource#
Operational Excellence · All resources · Rule · 2021_12 · Awareness
Use comments for each resource in ARM template to communicate purpose.
Description#
ARM templates can optionally include comments in resources. This helps other contributors understand the purpose of the resource.
Recommendation#
Specify comments for each resource in the template.
Examples#
Configure with Azure template#
To define Azure template files that pass this rule:
- Specify
comments
for each resource in the template.
For example:
Azure Template snippet
"resources": [
{
"name": "[variables('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"location": "[resourceGroup().location]",
"comments": "This storage account is used to store the VM disks.",
...
}
]