Firstly, it’s important to know the difference between Azure Resources and Azure Resource Groups. An Azure Resource is a particular resource, such as a virtual machine, storage account, web app, database, virtual network, etc., while an Azure Resource Group is a container that holds all related resources for an Azure solution.
What is an ARM Template?
Azure Resource Manager (ARM) template is a JavaScript Object Notation (JSON) file assigned to resource items that are deployed to a resource group. The main reason for using ARM templates is to simplify the deploying process of your own resources into a resource group. You can start from a blank template or you can search the quickstart gallery and choose a scenario that you want to deploy.
How to deploy?
Choose a template that defines the infrastructure and configuration of your Azure solution. You can repeatedly deploy a solution throughout its lifecycle and customize it to meet your specific needs. It’s possible to retrieve a template for an existing resource group by either exporting the current state of the resource group or viewing the template used for a particular deployment.
“Create, customize, deploy”
How to export a template?
An ARM template can be exported from the existing resources in two ways:
– export the actual template that you used for a deployment
– export a template that represents the current state of the resource group
For example, you can create a virtual machine account, and export the template for it. Then you can add a database to modify the resource group and finally, you’ll be able to export a new template that represents its current state.
Is it adjustable?
Once the template is exported, you’re able to use it as many times you need it. Sometimes, during deployment, you’ll need to change the database account.