Deploy from a custom template issue

Deepika 20 Reputation points
2024-04-11T02:30:39.0366667+00:00

When I was trying to create a custom template (Used build your own template ). I got an error message.

User's image

I have an existing storage account named lab3az204

{
	"$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": "lab3az204"
			},
			"location": "[resourceGroup().location]",
			"kind": "StorageV2",
			"sku": {
				"name": "Premium_LRS",
				"tier": "Premium"
			}
		}
	],
	"outputs": {}
}

Project details
 
Subscription:SubscriptionFeb21
Resource group: rg8

Instance details
Region: US EAST
Name: customdeployment100

Thus when creating a custom deployment on portal.azure.com. Folling is my 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)

Thank you,
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.
2,709 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 5,925 Reputation points Microsoft Vendor
    2024-04-12T05:35:30.69+00:00

    Hello Deepika,

    Thank you for posting your query here!

    The error message indicates that the schema URL in your ARM template is not supported. The supported versions are ‘2014-04-01-preview,2015-01-01,2018-05-01,2019-04-01,2019-08-01’.

    In your ARM template, you have used the schema URL as ‘https://schema.management.azure.com/schemas/2019-0401/deploymentTemplate.json#’.

    Can you please replace it with a supported schema URL. For example, you can use the following:

    ‘https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#’. (Please replace ‘2019-0401’ with ‘2019-04-01’).

    I hope this helps! Please let me know if the issue persists or if you have any other questions.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful