
There are five labs that form the core Bicep path, running from your first template through to managing resource lifecycles with deployment stacks.
Whether infrastructure as code is new to you or you are migrating off ARM templates, this maps each lab to what it actually teaches, and the order that makes each one land. Two further labs sit beyond the path for when you are ready.
The path
| Order | Lab | Level | What it builds |
|---|---|---|---|
| 1 | Introduction to Bicep | Beginner | Write and deploy your first template |
| 2 | Expressions, parameters, variables | Beginner | Make templates configurable |
| 3 | Deploy VNet and VM | Beginner | Real networking infrastructure |
| 4 | Conditions, loops, what-if | Intermediate | Logic and safe previews |
| 5 | Deployment stacks | Advanced | Resource lifecycle ownership |
Each runs 45 to 60 minutes. You could do the whole path in a day, though spreading it across a week gives the ideas somewhere to settle.
Lab 1: Write and deploy your first template
Start here if you have never opened a .bicep file. This covers installing the tooling, the file structure, a simple resource declaration, and deploying with az deployment group create.
By the end you will have created a real resource from a template, and seen the compilation step where Bicep produces ARM JSON underneath. That step is worth watching once, because it explains why certain error messages talk about JSON you never wrote.
Skills: Bicep syntax, resource declarations, CLI deployment, the Bicep to ARM compilation.
Start with introduction to Azure Bicep.
Lab 2: Parameters, variables, outputs and functions
A hardcoded template is fine once. Anything you deploy twice needs parameters.
This teaches inputs, computed variables, return values, and the built in functions you will reach for constantly, such as uniqueString() and resourceGroup().location. It also introduces decorators like @description, @minLength and @allowed, which put validation and documentation in the template itself rather than in a wiki nobody updates.
Skills: Parameters with defaults and validation, variables, outputs, built in functions, decorators.
Work through expressions, parameters and outputs.
Outputs are what connect modules
Outputs look optional until you split a template into modules. A networking module outputs a subnet ID and a compute module takes it as a parameter, and that single link is what lets Bicep order the deployment for you. Practise them here rather than discovering them later.
Lab 3: Deploy a virtual network and VM
This is where it becomes practical. You write a template producing a full networking stack, virtual network, subnet, NSG, public IP and NIC, then deploy a Linux VM into it.
The thing to watch is dependency handling. Because resources reference each other, Bicep works out the ordering itself and you never write dependsOn. This lab is the closest of the five to something you would actually deploy at work.
Skills: Multi resource templates, implicit dependencies, NSG rules, VM configuration, SSH key authentication.
Deploy a virtual network and VM with Bicep.
If you want the code explained line by line before or after running it, we walk through the same build in deploy a VNet and VM with Bicep.
Lab 4: Conditions, loops and what-if
Real templates need to vary. Deploy diagnostics storage only in production. Create subnets from an array. Skip a resource when a flag is off.
This covers if conditions, for loops and the what-if command that previews changes before they happen. What-if is the one to internalise, because it turns every deployment into something you can inspect first rather than something you launch and watch.
Skills: Conditional deployment, array and index loops, what-if previews, safe deployment habits.
Practise conditions, loops and what-if.
What-if is not infallible
It occasionally reports changes that will not happen, usually on properties Azure populates itself. If a preview shows a modification you did not ask for, check whether that property is something you set explicitly or something the platform fills in. When it is genuinely unclear, deploy to a test resource group first.
Lab 5: Deployment stacks
Stacks solve a specific problem. Remove a resource from an ordinary template and redeploy, and the resource simply stays in Azure. The template stopped describing it and nothing deleted it. Repeat that over a year of refactoring and you have resources nobody can account for.
A deployment stack tracks what it owns and removes what leaves the template. This lab covers creating and updating stacks, the deny settings that stop managed resources being changed from outside, and the difference between detaching a resource and deleting it.
Skills: Stack creation and updates, deny settings, lifecycle management, detach against delete.
Learn deployment stacks and resource lifecycle.
Stacks delete resources by design
Removing a resource from a stack managed template and updating the stack deletes it from your subscription. That is the feature working as intended, and it is exactly why a refactor of a stack template deserves a what-if run and a non production test first.
Beyond the path
Two labs sit past the core five, and both are worth doing once templates are comfortable.
Automating Bicep deployments with GitHub Actions moves deployment out of your terminal and into a pipeline, which is where it belongs as soon as more than one person is involved.
Deploying a full environment with Bicep is the integration exercise, combining modules, parameters and conditions into one coherent deployment rather than a single resource at a time.
How this maps to AZ-104
Templates sit inside the compute deployment domain, worth roughly a fifth to a quarter of the exam. Four things are expected of you: interpret an existing template, modify one, deploy from one, and export an existing deployment as one.
Labs 1 through 4 cover all four directly. Interpretation is the one worth extra attention, because most people practise writing templates and never practise reading someone else's, which is what the exam actually puts in front of you.
The wider view
Bicep is Azure native and it is not the only option. If your team spans clouds, Terraform applies the same plan and apply workflow across AWS, Azure and GCP, and knowing both is genuinely useful.
For the reasoning behind why Bicep exists at all, read Azure Bicep explained.
Ready to Master Cloud Engineering?
Get access to hands-on labs, expert-led courses, and a supportive community.
Practice it hands-on
Labs where you can apply what this article covers, in a real environment.
Azure Deployment Stacks with Bicep for Resource Lifecycle Management
Use Azure Deployment Stacks to manage resource lifecycle as a single unit with detach and delete policies, state inspection, and stack cleanup.
cloudlearn.ioStart labDeploy a Full Azure Environment Using Bicep Infrastructure as Code
Write modular Bicep templates to deploy a VNet, App Service, SQL Database, and Key Vault, then deploy the full environment using Azure CLI.
cloudlearn.ioStart labAzure Bicep Conditions Loops and What-If Deployments
Use Bicep conditional expressions, for-loops, and what-if analysis to dynamically deploy and preview Azure infrastructure changes.
cloudlearn.ioStart lab





