Mar 15, 2022 Azure

ARM Templates | Azure

It is notable that Cloud Computing is no longer a future prognosis but part of the daily life of several companies and people, with it several changes and transformations have occurred. New ways to achieve goals, build and deliver something and even communicate with people.

In the midst of this transformation, agile methodologies gained prominence and were adopted. However, for their proper functioning, some changes or adaptation in culture is necessary, for example when we talked about DevOps, where the infrastructure became part of the interactive process, theoretically excluding barriers between Devs and Ops. In other words, it’s a major transformation.

One of the aspects that have gained prominence in this new paradigm is automation. Automating deployments using infrastructure as code is one of the challenges. Now, the infrastructure used to support your application is coded, stored in a source repository, and also has its version control.

When using Microsoft Azure solutions, you can implement infrastructure as code ( IaC – Infrastructure as Code ) using Azure Resource Manager templates, popularly known as ARM Templates, which are composed of JSON files ( JavaScript Object Notation ), where all the project settings are defined in them.

With ARM Templates it is possible to create a complete infrastructure in Azure, that is, it is possible to implement network resources, storage, virtual machines, and a multitude of other available configurations. All this without even logging into the portal, which seems to be quite complicated seen by native infrastructure teams without any development background, but believe me, it’s not that difficult.

I will detail below a practical example of use:

Suppose your company decided to migrate some workloads for Microsoft Azure, therefore, in the first phase it will be necessary to create 10 Storage Accounts. At first, comes the thought of opening the portal and manually creating these 10 resources, however, this would take a long time with repetitive and tedious tasks.

When using ARM Templates, this task can be easily automated, as basic information that would be entered 10 times in the graphical console, one at a time, will be transcribed only once to JSON files, and can be changed and implemented several times as needed, in order to an easier and faster way.

See below a simple illustration of part of the creation of a Storage Account in the panel and part of its creation using ARM Templates :

Creation via Portal:

Não foi fornecido texto alternativo para esta imagem

Creation via ARM Template :

Não foi fornecido texto alternativo para esta imagem

As shown in the images above, the parameters used for creation via the portal are also used in the ARM Template. In fact, this is just a simple illustrative example and a few more lines of code are needed for this deployment.

The use of ARM Templates goes far beyond just an implementation via code, but also for a complete integration with tools such as Azure DevOps in the creation of Pipelines, version control, and implementation, CI/CD, code policies to support governance, among others.

You can start learning from scratch, Microsoft offers a step-by-step guide to Deploy and manage resources in Azure using ARM templates, which can be seen here: https://docs.microsoft.com/en-us/learn /paths/deploy-manage-resource-manager-templates/.

Source and more information on this subject can be found here: https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/

Thank you.

 

 

1 Comment

  • I haven¦t checked in here for some time since I thought it was getting boring, but the last few posts are great quality so I guess I¦ll add you back to my daily bloglist. You deserve it my friend 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

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