Deploying VNets, VMs, IAM, Policies, Monitoring, and Governance using Infrastructure as Code.
Manual infrastructure deployment does not scale in modern cloud environments. Infrastructure as Code (IaC) enables teams to deploy, manage, and govern Azure resources consistently, securely, and repeatedly.
In this hands-on lab, I automated a full Azure infrastructure deployment using Bicep, ARM templates, and Visual Studio Code, replicating how enterprises provision cloud environments at scale.
This walkthrough covers networking, compute, security, governance, monitoring, and identity, all deployed via code.
🎥 Video Walkthrough
Lab Objectives
By the end of this lab, you will be able to:
-
Set up a local Azure IaC development environment
-
Deploy Azure infrastructure using Bicep
-
Implement identity and access control with Microsoft Entra ID
-
Enforce governance with Azure Policy
-
Apply consistent tagging automatically
-
Validate deployments using Azure Portal and CLI
Lab Prerequisites
-
Azure subscription
-
Azure CLI installed
-
Visual Studio Code
-
Bicep extension
-
Azure Account extension
-
ARM Template Viewer
Part 1: Set Up the Development Environment
-
Install Visual Studio Code
-
Install required extensions:
-
Azure Account
-
Bicep
-
ARM Template Viewer
-
-
Authenticate to Azure:
az login
Part 2: Create the Resource Group
Define a resource group to logically contain all resources.
az group create \
--name rg-iac-lab \
--location eastus
Part 3: Write and Deploy Bicep Templates
Bicep templates were created for:
- Virtual Networks & Subnets
- Network Security Groups
- Network Interfaces
- Windows & Linux Virtual Machines
- Storage Accounts
- Azure Monitor
- Resource Tagging (automatic)
Deploy using:
az deployment group create \
--resource-group rg-iac-lab \
--template-file main.bicep
Part 4: Identity & Access Management (IAM)
Using Microsoft Entra ID:
- Managed users and groups
- Enabled Privileged Identity Management (PIM)
- Assigned Contributor role via Just-In-Time (JIT) access
- Verified role activation in the Azure Portal
Part 5: Security Governance with Azure Policy
Validation steps:
-
Checked deployments in Azure Portal
-
Verified resource tags
-
Confirmed JIT role activation
-
Reviewed policy compliance status
✅ All resources deployed successfully
✅ Governance enforced
✅ Access controlled
✅ Infrastructure fully automated
Why Bicep?
Bicep was chosen because:
-
Cleaner syntax than raw ARM JSON
-
Faster development
-
Native Azure support
-
Excellent VS Code integration (autocomplete, validation)
Key Takeaway
Infrastructure as Code is no longer optional in cloud engineering.
Using Bicep allows teams to:
-
Reduce configuration drift
-
Improve security and governance
-
Scale environments confidently
-
Deploy infrastructure the same way, every time
This lab demonstrates real-world Azure automation, not just theory.
Discover more from Humble Cloud Tech
Subscribe to get the latest posts sent to your email.



