Lab 03: Managing Azure Resources with ARM and Bicep Templates
I’m Amir Rouhanipoor, an IT Consultant specializing in Azure and cloud solutions. I help organizations streamline their IT and drive growth through secure, efficient cloud technologies.
Search for a command to run...
I’m Amir Rouhanipoor, an IT Consultant specializing in Azure and cloud solutions. I help organizations streamline their IT and drive growth through secure, efficient cloud technologies.
No comments yet. Be the first to comment.
Objective: This lab introduces fundamental Azure virtual networking concepts. You will create virtual networks, subnets, network security groups (NSGs), application security groups (ASGs), and configure DNS zones. Scenario: Your organization is expan...
PowerShell Script for VM Size Comparison This script lists all session hosts with their host pool, VM name, and VM size across all host pools(loop through multiple resource groups): Connect-AzAccount # Get all host pools $hostPools = Get-AzWvdHostPo...
M03 - Unit 4: Configure an ExpressRoute Gateway Exercise Scenario To connect your Azure virtual network to your on-premises network using ExpressRoute, you must first create a virtual network gateway. A virtual network gateway serves two key purposes...
M02-Unit 3 Create and configure a virtual network gateway Scenario You will configure a VPN gateway to securely connect CoreServicesVnet (East US) and ManufacturingVnet (North Europe) using VNet-to-VNet VPN. Task 1: Create CoreServicesVnet and Manuf...
Introduction Azure ExpressRoute is a private, enterprise-grade connection that enables secure and reliable network connectivity between your on-premises infrastructure and Microsoft’s global network. It bypasses the public internet and provides high ...
You need to create three virtual networks: 1. CoreServicesVnet Region: East US Purpose: Main network (web services, databases, shared services like DC/DNS). Connectivity: Needs VPN connection to on-premises. Address Space: Large (because of expe...
Security-focused Cloud & Automation Engineer with a Master’s in Computer Science and 6+ years of experience automating and supporting enterprise IT environments across multi-site corporate and operational infrastructures. Proficient in Python scripting, Azure infrastructure, Windows Server, and identity management. Skilled in integrating third-party platforms, securing configurations, and streamlining operations. Currently pursuing the Cybersecurity Architect Expert certification with a strong focus on cloud security and automation.
visit microsoft learn github for complete instructions
This lab teaches you to automate Azure deployments using ARM and Bicep templates. You'll learn to create, edit, and deploy them using the Azure portal, PowerShell, and CLI.
Optional simulations to reinforce your understanding:
Manage resources with ARM templates: Create and deploy managed disks.
Create a VM with a template: Deploy a VM using a Quickstart template.
Your team wants to automate and simplify resource deployments to reduce administrative overhead, human error, and increase consistency.

Create an ARM Template: Create a managed disk and export its template.
Edit and Redeploy: Modify the template and redeploy to create another disk.
Deploy with PowerShell: Configure Cloud Shell and deploy the template using PowerShell.
Deploy with CLI: Deploy the template using CLI commands in Cloud Shell.
Deploy with Bicep: Use a Bicep file to deploy a managed disk.
Sign in to the Azure portal: https://portal.azure.com and Navigate to: Disks > Create
Create a managed disk (e.g., az104-disk1 in East US).
Go to the disk's resource > Automation > Export template.
Download the template and extract the two JSON files. (template and parameters file)
Search for "Deploy a custom template" in the portal.
Select "Build your own template in the editor".
Upload template.json and modify it (e.g., change disk name to az104-disk2).
Upload parameters.json and update it to match the template.
Deploy the template and verify the new disk is created.
Open Cloud Shell in the Azure portal and select PowerShell.
Mount a storage account and upload the template files.
Edit template.json in the Cloud Shell editor (e.g., change disk name to az104-disk3).
Run the following command to deploy:
PowerShell
New-AzResourceGroupDeployment -ResourceGroupName az104-rg3 -TemplateFile template.json -TemplateParameterFile parameters.json
Get-AzDisk.Switch to Bash in Cloud Shell.
Edit template.json (e.g., change disk name to az104-disk4).
Run the following command to deploy:
Bash
az deployment group create --resource-group az104-rg3 --template-file template.json --parameters parameters.json
az disk list --output table.Stay in Bash in Cloud Shell.
Upload the azuredeploydisk.bicep file.
Edit the Bicep file and make changes (e.g., change disk name, SKU, size).
Run the following command to deploy:
Bash
az deployment group create --resource-group az104-rg3 --template-file azuredeploydisk.bicep
Delete the resource group to avoid unnecessary costs.
Use Copilot in Edge or copilot.microsoft.com to explore further:
ARM template format and components
Using existing ARM templates
Comparing ARM and Bicep templates
ARM templates enable managing infrastructure as a group.
ARM templates use JSON for declarative infrastructure definition.
Parameters can be stored in separate JSON files.
ARM templates can be deployed via various methods.
Bicep offers a simpler and more efficient alternative to ARM templates.