These are JSON files that define the infrastructure and configuration of your application.
These templates can be reused to create the same application cofiguration in different
Consider the scenario where you need to deploy the following architecture into various environments (DEV, QA, STAGING, PRODUCTION)
To solve this we need some kind of automation,
One approach will be to write a script using Azure CLI / Azure Powershell. The problem with this approach changing the script for any updates in architectures and changing values for resources like vm size, zone etc will be difficult to handle
Second approach is to create a template that defines the above architecture in json format and execute it on various environments.
ARM Templates provide us the following advantages
Create one linux vm in a new resource group
After linux vm is created, add one windows vm to the same resource group
Now navigate to the resource group section and select the created resource group
Azure is creating a template when we try to create resources.
In this section we will learn how to create an arm template,
To do this lets setup our developer environment
Ensure Azure CLI or Azure Powershell is installed on your machine Refer Here
Ensure Visual studio code is installed
How are resources created in Azure
In your subscription, you will have resource providers
Resource Provider in azure is capable of creating resources which it provides or offers
When we try to create any resource in Azure (from portal/cli/arm template)
It will check if the resource provider is registered or not
If the resource provider is not registered then it will throw error messages
If the resource provide is register then it will validate the values passed and if they are ok resources will be created.