Book Image

Azure Resource Manager Templates Quick Start Guide

By : Ritesh Modi
Book Image

Azure Resource Manager Templates Quick Start Guide

By: Ritesh Modi

Overview of this book

Azure Resource Manager (ARM) templates are declarations of Azure resources in the JSON format to provision and maintain them using infrastructure as code. This book gives practical solutions and examples for provisioning and managing various Azure services using ARM templates. The book starts with an understanding of infrastructure as code, a refresher on JSON, and then moves on to explain the fundamental concepts of ARM templates. Important concepts like iteration, conditional evaluation, security, usage of expressions, and functions will be covered in detail. You will use linked and nested templates to create modular ARM templates. You will see how to create multiple instances of the same resources, how to nest and link templates, and how to establish dependencies between them. You will also learn about implementing design patterns, secure template design, the unit testing of ARM templates, and adopting best practices. By the end of this book, you will understand the entire life cycle of ARM templates and their testing, and be able to author them for complex deployments.
Table of Contents (12 chapters)
Free Chapter
1
Section 1: ARM Template Foundational Skills
6
Section 2: ARM Template Advanced Concepts

What this book covers

Chapter 1, Infrastructure as Code and Configuration Management, starts by taking a look at configuration management and IaC. We will get introduced to the ARM framework provided by Azure, start to understand the concept of ARM templates, and learn the process of designing an ARM template. There is also a brief primer on JSON, since ARM templates themselves are based on JSON.

Chapter 2, Azure Resource Manager Templates, marks the start of our involvement with the development of ARM templates. We will start with the basics of ARM templates and cover the concepts that are essential for writing meaningful templates. This chapter will also include the usage of ARM template parameters and variables.

Chapter 3, Understanding Core Elements of ARM Templates, offers a detailed discussion of important ARM template concepts, including resources and outputs, and expressions and functions, along with a discussion on some of the most important functions, including reference and resourceId.

Chapter 4, Advance Template Features, covers real enterprise-level concepts, such as nested and linked templates, using deployment resources to invoke them, and using copy iterators to create multiple resources in sequence and parallel. We will also take a look at condition resources and learn about resource interdependency. This chapter also goes into a deeper implementation of cross-subscription, cross-resource group, and cross-region deployments using a single ARM template.

Chapter 5, IaaS Solutions Using Templates, focuses on exploring ARM templates for configuring environments using virtual machines. ARM templates provide virtual machine extensions that can automatically execute PowerShell and Desired State Configuration scripts following the creation of a virtual machine. This chapter will go deep into the trenches of these extensions, and provide solutions for both Windows and Linux operating systems.

Chapter 6, Unit Testing ARM Templates, covers topics on testing and maintaining the quality of ARM templates. We will investigate ways to unit test ARM template deployments and environments.

Chapter 7, Design Patterns, explores the composition of ARM templates that are modular, reusable, and maintainable. This chapter will provide a complete example for authoring an ARM template that is stored securely within Azure Storage blob containers, for storing credentials and secrets in Key Vaults, for provisioning and updating resources in the same ARM template, for linking and nesting templates, for autogenerating variables, and more.

Chapter 8, ARM Template Best Practices, focuses on using best practices while developing templates. These best practices help in creating ARM templates that are easy to change and maintain. They include parameters, variables, output and resource element best practices, security best practices, deployment-related best practices, and miscellaneous best practices.