AZURE ARM Classroom Series – 26/Sep/2019

Terms

  • Template: Json file which we are trying to write
  • Deployment:
    • Executing Template to Create Resources. This process is called as Deployment.
    • Every Resource Manager can create Deployments
    • Deployments can be create at subscription level.
    • We would initial focus towards Resource Group Deploymnets.
  • Lab Setup Contd..
Install Extension "Azure Resource Manager Tools"

ARM Template to Create VNET with one subnet

  • As a starting point we have basic arm template
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion" : "1.0.0.0",
    "resources": []
}
  • Lets look at template refererence or google for ‘arm <service/resource name> template reference’
  • Once you navigate to network section in Template reference, you might end up seeing some dates. These dates are api versions.
  • I would navigate toe latest api version & then to virtual Network Refer here
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion" : "1.0.0.0",
    "resources": [
        {
            "name": "fromarm",
            "type": "Microsoft.Network/virtualNetworks",
            "apiVersion": "2019-04-01",
            "location": "Central US",
            "properties": {
                "addressSpace": {
                    "addressPrefixes":["192.168.0.0/16"]
                }

            }
        }
    ]
}
  • Now Lets add a Storage Account. Then we will navigate to Template reference for storage Account
{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion" : "1.0.0.0",
    "resources": [
        {
            "name": "fromarm",
            "type": "Microsoft.Network/virtualNetworks",
            "apiVersion": "2019-04-01",
            "location": "Central US",
            "properties": {
                "addressSpace": {
                    "addressPrefixes":["192.168.0.0/16"]
                }

            }
        },
        {
            "name": "qtarmexample",
            "type": "Microsoft.Storage/storageAccounts",
            "apiVersion": "2019-04-01",
            "sku": {
                "name": "Standard_LRS"
            },
            "kind": "StorageV2",
            "location": "Central US",
            "properties":{
                
            }
        }
    ]
}

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner