IAC – ARM Templates Assignments

Tools and Softwares

  • Install Azure CLI
  • Install Visual Studio Code
  • ARM Tool extension

Hello World – ARM Template

  • Create a Hello World – ARM Template which outputs Hello World when you submit the Template
  • Learn how to validate the ARM Template Content in Visual Studio Code
  • Learn how to validate the ARM Template Content using PowerShell and ADO Pipeline
  • Learn how to Preview the changes before submitting to Azure

Create the below 2 ARM Templates

In this section, you will create two different ARM templates for the below.

Advertisements

Create ARM Template for Database module

  • Logical SQL Server
  • Hard Code the SQL Credentials (Optimize this later using Key Vault)
  • SQL Database
  • Use a Parameter file for passing all the parameters
  • Validate the template
  • Execute the template file using Power Shell

Create ARM Template for Web module

  • App Service Plan (Windows OS and F1 pricing tier )
  • App Service (for .net6 runtime stack)
  • The template should output the Outbound IP Addresses
  • Use a Parameter file for passing all the parameters
  • Validate the template
  • Execute the template file using Power Shell

Linked – Combine both the Web and Database Modules

Create a Storage Account

  • Create a new Storage Account for storing the Linked Templates
  • Create a container named armtemplates
  • Upload all the template files and the parameter files into armtemplates container
  • Create a main Linked Template in Visual Studio
  • Call Database module
  • Call Web module
  • Ensure that the Database module executes first and the Web Module waits for the Database module to complete it’s execution.
  • Retrieve the output of Web module (App Service Outbound IP Addresses) and pass them as inputs to Database module.
  • Use a Parameter file for passing all the parameters
  • Validate the template
  • Execute the template file using Power Shell

Key Vault – Integrate Key-Vault with IAC Templates

  • Remove the hard-coded secret in the Database module
  • Create the secret in the Key-Vault
  • Create a Service Principle
  • Provide appropriate permissions to the Service Priciple on Key-Vault using Access Control (IaM)
  • Execute the template file using Power Shell
Advertisements

Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups

WhatsApp

Telegram

Advertisements
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s