3 Writing ARM templates
This chapter covers
- The structure of an ARM template
- Declaring resources and child-resources
- Working with parameters and variables
- Returning outputs
- Using and writing functions
In chapter two, you were introduced to a simple ARM template and saw how to get that deployed. This chapter goes much more in-depth on various techniques and features of the ARM Templates. While chapter two already showed how to create your first template and briefly introduced an ARM template layout, this chapter covers declaring resources, parameters, variables, functions, and output sections much more in-depth.
To help with this, you create an ARM Template throughout the chapter. This infrastructure hosts an API, which is the backend for a webshop. It is capable of accepting, processing, and storing orders. The API saves all orders in a SQL Database and generates a PDF file, which is sent to the customer via email. These PDF files are also stored in an Azure Storage Account for later use. The API itself runs on an Azure App Service and uses KeyVault as a secret store. Finally, you throw Application Insights in the mix, which allows for monitoring the API.
Figure 3.1 provides a visualization of this infrastructure.
Figure 3.1: A simple application architecture