Use a recent template schema version

March 29, 2024 ยท View on GitHub

SYNOPSIS

Use a more recent version of the Azure template schema.

DESCRIPTION

The JSON schemas used to define Azure templates are versioned. When defining templates use templates with a supported schema.

The following template schemas are deprecated:

  • https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#

RECOMMENDATION

Consider using a more recent schema version for Azure template files.

EXAMPLES

Configure with Azure template

To define Azure template files that pass this rule:

  • Configure the template schema to one of the following:
    • https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#
    • https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#
    • https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#
    • https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#

For example:

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": { },
    "functions": [],
    "resources": [ ]
}