Managing your Cloud resources with ARM templates
Tags: tutorial, azure, devops, cloud
Published: 2020-10-21 13:27:40

---
title: Managing your Cloud resources with ARM templates
published: true
description: Moving to infrastructure as code, IaC means being able to express what you have in the Cloud as readable text files. IaC gives benefits such as knowing exactly what you have in the Cloud but also that you can version control and run tests on your deployments for example. Learn how to move to IaC by this series of tutorials. 
tags: tutorial, azure, devops, cloud
//cover_image: https://direct_url_to_image.jpg
---

TLDR; a description of a set of tutorials just release on aka.ms/learn on the topic of Azure Resource Management. 

aka.ms/learn is the Microsoft platform where you freely can skill up on any Cloud topics but also on various other topics like programming languages, machine learning and more. 

## Infrastructure as Code

Infrastructure as Code, IaC is the process of expressing your infrastructure as Code as readable text files over using UIs to configure the same. The benefits of doing so are many. Below are some benefits:

- **Dev and Ops can work in the same process**. There's a need for Developers and Ops to work more tightly to innovate faster with speed and accuracy. Developers normally store their code in a version control system like Git. You can now do the same with your templates, text files desribing your Cloud resources.
- **Anyone can deploy**. When your templates are in version control, anyone, with the appropriate access level, can deploy. Just use a tool like Azure-CLI or PowerShell to do so. When everyone in a team can deploy it's important that it can be done consistently and reliably. 
- **You know what's in the Cloud**. Before IaC you were/are using a graphical interface or some tool to manage your resources. It's easy to lose track of what you have in the Cloud. If you instead express your resources as text files it's a lot easier to see what's going on.
- **Easier to reproduce elsewhere**. In theory at least, it should be a lot easier to recreate your Cloud operation elsewhere if you are looking to expand your company's business elsewhere.

## Azure Resource Manager

Azure Resource Manager, ARM, is one of the ways you can use to implement IaC, the other way is by using Terraform. The idea is to define your cloud resources as JSON files. Then you deploy the files to the Cloud by running either Azure-CLI or PowerShell. Every JSON file is known as a template. A template contains your resources you want to deploy but it also contains different constructs that makes it easy to manage your resources as things gets more complicated. Examples of such constructs are parameters, variables, template functions and outputs. 

### LEARN path

IaC using ARM is quite a big topic. Therefore myself and some colleagues have authored a 4 part series describing the various constructs and aspects of it.

Here's a link to the path, an overview page for all the tutorials

> [https://docs.microsoft.com/en-us/learn/paths/deploy-manage-resource-manager-templates/](https://docs.microsoft.com/en-us/learn/paths/deploy-manage-resource-manager-templates/?WT.mc_id=devops-10186-chnoring)

Each tutorial contains various aspects of ARM. Below follows a description of each tutorial:

### Deploy consistent infrastructure in Azure by using Azure Resource Manager (ARM) templates

> [https://docs.microsoft.com/en-us/learn/modules/create-azure-resource-manager-template-vs-code/](https://docs.microsoft.com/en-us/learn/modules/create-azure-resource-manager-template-vs-code/?WT.mc_id=devops-10186-chnoring)

Write Azure Resource Manager templates by using Visual Studio Code to deploy your infrastructure to Azure consistently and reliably.

- Implement an Azure Resource Manager template by using Visual Studio Code.
- Declare resources and add flexibility to your template by adding resources, parameters, and outputs.

### Deploy to multiple Azure environments by using ARM templates

> [https://docs.microsoft.com/en-us/learn/modules/modify-azure-resource-manager-template-reuse/](https://docs.microsoft.com/en-us/learn/modules/modify-azure-resource-manager-template-reuse/?WT.mc_id=devops-10186-chnoring)

Manage multiple Azure environment deployments of your Azure Resource Manager templates by using functions, variables, tags, and parameter files.

- Create an expression for a unique value by using Azure Resource Manager template functions.
- Reuse your expression by storing it in an Azure Resource Manager template variable.
- Organize and track your deployed Azure resources by using resource tags.
- Manage multiple deployment parameters by using Azure Resource Manager template parameter files.

### Validate your deployments by using what-if and the ARM template test toolkit

> [https://docs.microsoft.com/en-us/learn/modules/arm-template-test/](https://docs.microsoft.com/en-us/learn/modules/arm-template-test/?WT.mc_id=devops-10186-chnoring)

This module teaches two major things, how to preview your changes with the what-if operation and the value of doing so. Secondly it teaches you how to create valid templates and gives you good recommendations that you can follow using the ARM template test toolkit tool.

- Preview what changes will happen before you deploy by using the what-if operation.
- Validate your templates adherence to sound recommendations using ARM template test toolkit.
- Implement domain specific rules for deployments that can be run by ARM template test toolkit.

### Deploy modular and reusable ARM templates from the command line and by using GitHub Actions

> https://docs.microsoft.com/en-us/learn/modules/deploy-templates-command-line-github-actions/?WT.mc_id=devops-10186-chnoring

Learn how to deploy Azure Resource Manager (ARM) templates by using Azure PowerShell, the Azure CLI, and from GitHub Actions. Use linked templates to break down complex templates into templates that are more modular.

- Choose the best way to deploy ARM templates, based on your needs.
- Modularize your templates by using linked templates.
- Learn how to create a GitHub Actions to deploy templates.