Azure Classroom Series – ARM Templates – 28/Dec/2019

ARM Templates

Syntax or Structure of ARM Templates

  • Refer Here for official docs from Microsoft
  • Structure is
{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "",
  "apiProfile": "",
  "parameters": {  },
  "variables": {  },
  "functions": [  ],
  "resources": [  ],
  "outputs": {  }
}

ARM Template for Storage Account Creation

  • Create a directory
mkdir hello-arm
new-item main.json
  • Open VSCode and Install Extension for ARM Template as shown below Preview
  • Lets try to build basic skeleton for ARM Template with Resource Group Deployment for
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion" : "0.0.1",
    "resources": [] 
}
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "0.0.0.1",
    "resources": [
        {
            "name": "qtstoragearmdemo",
            "type": "Microsoft.Storage/storageAccounts",
            "apiVersion": "2019-04-01",
            "sku":{
                "name": "Standard_LRS"
            },
            "kind":"StorageV2",
            "location":"Central US",
            "properties":{
                "accessTier":"Hot"
            }


        }
    ]

}
  • Lets Deploy this template as mentioned in the docs over here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner