aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • DevOps
  • Platforms

How To Provision Using Azure Resource Manager (ARM) Templates

  • root
  • January 8, 2020
  • 4 minute read

Overview

Azure Resource Manager or ARM templates is one of the ways for deploying or creating resources in Azure. It is an Infrastructure as a code solution that uses the JavaScript Object Notation (JSON) to define the target deployment of resources. It is similar to Google Cloud Platform’s Deployment Manager which uses YAML and Amazon Web Service Ansible which is also in YAML format.

This guide shows how to create and run ARM templates through the Azure portal.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Prerequisites

  • Credential access to the Azure Portal
  • Sufficient access or role for provisioning a Virtual Machine. In this demo, a VM will be provisioned, but your access needs might change depending on the resource you will create.

 

01. Login through the Azure portal at https://portal.azure.com/

 

02. On the top bar, search for “Deploy a custom template”

 

 

03. Select the “Build your own template in the editor” option.

 

04. The template editor will be shown. You can either paste the following template into the editor or save the following template in a local file and upload it using the “Load file” option.

 

The following template provision


{

    "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "location": {
            "type": "string"
        },

        "networkInterfaceName": {
            "type": "string"
        },

        "networkSecurityGroupName": {
            "type": "string"
        },

        "networkSecurityGroupRules": {
            "type": "array"
        },

        "subnetName": {
            "type": "string"
        },

        "virtualNetworkName": {
            "type": "string"
        },

        "addressPrefixes": {
            "type": "array"
        },

        "subnets": {
            "type": "array"
        },

        "publicIpAddressName": {
            "type": "string"
        },

        "publicIpAddressType": {
            "type": "string"
        },

        "publicIpAddressSku": {
            "type": "string"
        },

        "virtualMachineName": {
            "type": "string"
        },

        "virtualMachineRG": {
            "type": "string"
        },

        "osDiskType": {
            "type": "string"
        },

        "virtualMachineSize": {
            "type": "string"
        },

        "adminUsername": {
            "type": "string"
        },

        "adminPublicKey": {
            "type": "secureString"
        },

        "diagnosticsStorageAccountName": {
            "type": "string"
        },

        "diagnosticsStorageAccountId": {
            "type": "string"
        },

        "diagnosticsStorageAccountType": {
            "type": "string"
        },

        "diagnosticsStorageAccountKind": {
            "type": "string"
        }
    },

    "variables": {
        "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]",

        "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",

        "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]"
    },

    "resources": [
        {
            "name": "[parameters('networkInterfaceName')]",
            "type": "Microsoft.Network/networkInterfaces",
            "apiVersion": "2019-07-01",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]",
                "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
                "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]"
            ],

            "properties": {
                "ipConfigurations": [
                    {
                        "name": "ipconfig1",
                        "properties": {
                            "subnet": {
                                "id": "[variables('subnetRef')]"
                            },
                            "privateIPAllocationMethod": "Dynamic",
                            "publicIpAddress": {
                                "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]"
                            }
                        }
                    }
                ],

                "networkSecurityGroup": {
                    "id": "[variables('nsgId')]"
                }
            }
        },

        {
            "name": "[parameters('networkSecurityGroupName')]",
            "type": "Microsoft.Network/networkSecurityGroups",
            "apiVersion": "2019-02-01",
            "location": "[parameters('location')]",
            "properties": {
                "securityRules": "[parameters('networkSecurityGroupRules')]"
            }
        },

        {
            "name": "[parameters('virtualNetworkName')]",
            "type": "Microsoft.Network/virtualNetworks",
            "apiVersion": "2019-04-01",
            "location": "[parameters('location')]",
            "properties": {
                "addressSpace": {
                    "addressPrefixes": "[parameters('addressPrefixes')]"
                },
                "subnets": "[parameters('subnets')]"
            }
        },

        {
            "name": "[parameters('publicIpAddressName')]",
            "type": "Microsoft.Network/publicIpAddresses",
            "apiVersion": "2019-02-01",
            "location": "[parameters('location')]",
            "properties": {
                "publicIpAllocationMethod": "[parameters('publicIpAddressType')]"
            },

            "sku": {
                "name": "[parameters('publicIpAddressSku')]"
            }
        },

        {
            "name": "[parameters('virtualMachineName')]",
            "type": "Microsoft.Compute/virtualMachines",
            "apiVersion": "2019-07-01",
            "location": "[parameters('location')]",
            "dependsOn": [
                "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]",
                "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]"
            ],
            "properties": {
                "hardwareProfile": {
                    "vmSize": "[parameters('virtualMachineSize')]"
                },

                "storageProfile": {
                    "osDisk": {
                        "createOption": "fromImage",
                        "managedDisk": {
                            "storageAccountType": "[parameters('osDiskType')]"
                        }
                    },

                    "imageReference": {
                        "publisher": "Canonical",
                        "offer": "UbuntuServer",
                        "sku": "18.04-LTS",
                        "version": "latest"
                    }
                },

                "networkProfile": {
                    "networkInterfaces": [
                        {
                            "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]"
                        }
                    ]
                },

                "osProfile": {
                    "computerName": "[parameters('virtualMachineName')]",
                    "adminUsername": "[parameters('adminUsername')]",
                    "linuxConfiguration": {
                        "disablePasswordAuthentication": true,
                        "ssh": {
                            "publicKeys": [
                                {
                                    "path": "[concat('/home/', parameters('adminUsername'), '/.ssh/authorized_keys')]",
                                    "keyData": "[parameters('adminPublicKey')]"
                                }
                            ]
                        }
                    }
                },

                "diagnosticsProfile": {
                    "bootDiagnostics": {
                        "enabled": true,
                        "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]"
                    }
                }
            }
        },

        {
            "name": "[parameters('diagnosticsStorageAccountName')]",
            "type": "Microsoft.Storage/storageAccounts",
            "apiVersion": "2019-06-01",
            "location": "[parameters('location')]",
            "properties": {},
            "kind": "[parameters('diagnosticsStorageAccountKind')]",
            "sku": {
                "name": "[parameters('diagnosticsStorageAccountType')]"
            }
        }
    ],

    "outputs": {
        "adminUsername": {
            "type": "string",
            "value": "[parameters('adminUsername')]"
        }
    }
}

 

Read More  Microsoft Offers Azure ML Data Import CLI, SDK For Snowflake, Other Databases

Paste the code or upload the template file. Then select the “Save” button.

 

05. A new page will be shown with the JSON template loaded as form field. You must now specify the required parameters.

 

Or you can click on the “Edit parameters” to load a JSON file parameters. Use the following JSON as parameters.

 

Set the parameters as below. Then click on the “Save” button.


{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",

    "parameters": {
        "location": {
            "value": "southeastasia"
        },

        "networkInterfaceName": {
            "value": "vm-zo-geek-001328"
        },

        "networkSecurityGroupName": {
            "value": "vm-zo-geek-001-nsg"
        },

        "networkSecurityGroupRules": {
            "value": [
                {
                    "name": "SSH",
                    "properties": {
                        "priority": 300,
                        "protocol": "TCP",
                        "access": "Allow",
                        "direction": "Inbound",
                        "sourceAddressPrefix": "*",
                        "sourcePortRange": "*",
                        "destinationAddressPrefix": "*",
                        "destinationPortRange": "22"
                    }
                }
            ]
        },

        "subnetName": {
            "value": "default"
        },

        "virtualNetworkName": {
            "value": "rg-development-vnet"
        },

        "addressPrefixes": {
            "value": [
                "10.0.0.0/24"
            ]
        },

        "subnets": {
            "value": [
                {
                    "name": "default",
                    "properties": {
                        "addressPrefix": "10.0.0.0/24"
                    }
                }
            ]
        },

        "publicIpAddressName": {
            "value": "vm-zo-geek-001-ip"
        },

        "publicIpAddressType": {
            "value": "Dynamic"
        },

        "publicIpAddressSku": {
            "value": "Basic"
        },

        "virtualMachineName": {
            "value": "vm-zo-geek-001"
        },

        "virtualMachineRG": {
            "value": "rg-development"
        },

        "osDiskType": {
            "value": "Standard_LRS"
        },

        "virtualMachineSize": {
            "value": "Standard_D2s_v3"
        },

        "adminUsername": {
            "value": "devops"
        },

        "adminPublicKey": {
            "value": null
        },

        "diagnosticsStorageAccountName": {
            "value": "rgdevelopmentdiag428"
        },

        "diagnosticsStorageAccountId": {
            "value": "Microsoft.Storage/storageAccounts/rgdevelopmentdiag428"
        },

        "diagnosticsStorageAccountType": {
            "value": "Standard_LRS"
        },

        "diagnosticsStorageAccountKind": {
            "value": "Storage"
        }
    }
}

 

 

06. The parameters will now be loaded in the template, with the form field text boxes filled.

 

07. In this example, being an Ubuntu OS, a Public Key is needed for accessing the server. You can create an RSA key from the following link or any tool that creates the SSH key.

 

08. Accept the Terms and Conditions by selecting the checkbox. Then click on the “Purchase” button.

 

09. Wait until the resources, in this case, a Virtual Machine and its required resources (Virtual Network, IP Address, Storage Account and others) are created.

 

 

10. View the Virtual Machine resource. You can also view the other resources created by viewing the Resource Group.


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

root

Related Topics
  • Azure
  • Azure Resource Manager
  • Templates
You May Also Like
View Post
  • Data
  • Platforms
  • Technology

Scaling cloud and AI: Microsoft Azure’s commitment to Europe’s digital future

  • May 11, 2026
View Post
  • Data
  • Platforms
  • Public Cloud

PayPal’s historically large data migration is the foundation for its gen AI innovation

  • March 4, 2026
View Post
  • Platforms
  • Technology

Microsoft Sovereign Cloud adds governance, productivity and support for large AI models securely running even when completely disconnected 

  • March 3, 2026
Users with laptops working with database. Data storage and organization, information access and management, big data protection concept. Vector isolated illustration.
View Post
  • Architecture
  • DevOps
  • Technology

What is application migration? Examples and best practices

  • August 18, 2025
Google Cloud and Smart Communications
View Post
  • Platforms
  • Technology

Smart Communications, Inc. Dials into Google Cloud AI to Help Personalize Digital Services for Filipinos

  • October 25, 2024
View Post
  • Platforms
  • Public Cloud

Empowering builders with the new AWS Asia Pacific (Malaysia) Region

  • August 30, 2024
Red Hat and Globe Telecoms
View Post
  • Platforms
  • Technology

Globe Collaborates with Red Hat Open Innovation Labs to Modernize IT Infrastructure for Greater Agility and Scalability

  • August 19, 2024
Huawei Cloud Cairo Region Goes Live
View Post
  • Cloud-Native
  • Computing
  • Platforms

Huawei Cloud Goes Live in Egypt

  • May 24, 2024

Stay Connected!
LATEST
  • digital-nomad-freelancer-worker-2151205464 1
    One paperwork problem – Get your Digital Nomad Visa employment documents fast from UK, EU or Singapore
    • June 16, 2026
  • 2
    Samsung Art Store Brings Art Basel to Homes Worldwide With New Curated Collection
    • June 15, 2026
  • 3
    You Do Not Need to Invest in the IPO of SpaceX, Anthropic, and OpenAI
    • June 10, 2026
  • 4
    The consequences of relying on AI for accurate news
    • June 10, 2026
  • 5
    Connecting AI agents with unstructured data using Google Cloud Storage MCP Servers
    • June 10, 2026
  • 6
    WWDC26: Apple unveils next generation of Apple Intelligence, Siri AI, powerful parental controls, and an expansive set of software improvements
    • June 8, 2026
  • 7
    IBM and Google Cloud Announce Strategic Partnership to Scale AI with Human Expertise and AI‑Powered Delivery
    • June 4, 2026
  • Data center 8
    Data Sovereignty in Spain. It’s Not Just About the Law, It’s About Efficiency
    • June 3, 2026
  • 9
    Ink vs Pixels. What you miss versus what you are actually missing.
    • June 1, 2026
  • 10
    Banks race to patch new cyber vulnerabilities, and other cybersecurity news
    • May 25, 2026
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • pope-leo-xiv-cq5dam-1500.844 1
    Pope Leo XIV to Publish First Encyclical on Artificial Intelligence and Human Dignity on 25 May
    • May 22, 2026
  • 2
    Portfolio to Clients, and is Strengthened by Ongoing Project Glasswing Work
    • May 20, 2026
  • reMarkable Paper Pure 3
    Everything The reMarkable Paper Pure Actually Does
    • May 14, 2026
  • 4
    Scaling cloud and AI: Microsoft Azure’s commitment to Europe’s digital future
    • May 11, 2026
  • Anthropic Institute 5
    Introducing The Anthropic Institute
    • March 11, 2026
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.