0

I am trying to decompile A arm template into a bicep template. When executing my command I get an error that my schema "https://schema.management.azure.com/schemas/2018-05-01/deploymentTemplate.json#" does not exist anymore. Can I just change this to a newer schema, for example "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" without issues?

old_timer
  • 69,149
  • 8
  • 89
  • 168
Amateur
  • 177
  • 1
  • 9
  • 1
    yes , you can change , if you use vscode with azure resource manager tools it will also prompt you to upgrade the schema version and clicking on yes it will automatically change the version to the latest.. – Ansuman Bal Oct 14 '21 at 13:14

1 Answers1

0

$schema is the location of JavaScript Object Notation (JSON) schema file that specifies the version of the template language.

If you check this document from Microsoft you will find that if we are using Visual Studio Code with the Azure Resource Management tool extension then we are recommended to use the latest version for resource group deployments which is -

https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#

Therefore, yes you can change to the new schema if you are using VS Code and it will automatically prompt you to upgrade the schema version if you are using the old schema and clicking on yes it will change the version. But if anyone using other editor including Visual Studio, may not be able to process this new and for those editors it's recommended to use -

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

You can even get an empty ARM template with the latest schema if you use the arm! command on VS Code as shown in the screenshots below.

arm! command

empty template with latest schema

SauravDas-MT
  • 1,224
  • 1
  • 4
  • 10