Skip to content

Use comments for each ARM template resource#

Operational Excellence · All resources · Azure.Template.UseComments

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:

"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.",
      ...
  }
]

Last update: 2021-12-16