deploy a custom template Error

Deepika 20 Reputation points
2024-04-11T13:01:18.45+00:00

Dear Azure team,

I hope you have been doing well.

I have been trying to create a "deploy a custom template" ie. an ARM template. I am sending code and the error:

 ***Source code***:   {

"$schema": "https://schema.management.azure.com/schemas/2019-0401/deploymentTemplate.json#",

"contentVersion": "1.0.0.0",

"parameters": {

    "name": {

        "type": "string",

        "metadata": {

            "description": "mystorageaccount"

        }

    }

},

"functions": [],

"variables": {},

"resources": [

    {

        "name": "[parameters('name')]",

        "type": "Microsoft.Storage/storageAccounts",

        "apiVersion": "2019-06-01",

        "tags": {

            "displayName": "storageaccount1"

        },

        "location": "[resourceGroup().location]",

        "kind": "StorageV2",

        "sku": {

            "name": "Premium_LRS",

            "tier": "Premium"

        }

    }

],

"outputs": {}

}

Error: Deployment template validation failed: 'Template schema 'https://schema.management.azure.com/schemas/2019-0401/deploymentTemplate.json#' is not supported. Supported versions are '2014-04-01-preview,2015-01-01,2018-05-01,2019-04-01,2019-08-01'. Please see https://aka.ms/arm-syntax for usage details.'. (Code: InvalidTemplate)

Please advise.

Thanks,

Deepika

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,151 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,037 Reputation points Microsoft Employee
    2024-04-12T05:45:26.0833333+00:00

    @Deepika Thanks for posting your query on Microsoft Q&A.

    I followed the same steps to create a custom template on Azure Portal. I see the following:

    User's image

    Comparing this to what you have shared and also based on the error message, the schema version you’re using (2019-0401) is not among the supported versions for Azure Resource Manager (ARM) templates. Please use 2014-04-01 instead and let me know the results.


    If you have questions, please let me know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    Please don’t forget to "Accept Answer" and hit Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.