Hands-On LabBeginner

Deploy a Virtual Network and Virtual Machine Using Bicep

Build a real-world Bicep template that deploys a VNet with subnets, NSG rules, a public IP, and a Linux VM with SSH access.

60 minEstimated time
4Guided steps
AutoVerification
IsolatedSandbox
Deploy a Virtual Network and Virtual Machine Using Bicep

Lab overview

Deploying networking and compute resources is one of the most common tasks in cloud engineering, and Azure Bicep makes it dramatically simpler than writing raw ARM JSON. In this hands-on lab, you will build a complete multi-resource Bicep template from scratch that deploys a Virtual Network with subnets, a Network Security Group with SSH rules, a public IP address, a network interface, and a Linux Virtual Machine.

You will start by defining the networking foundation. You will create a VNet with a subnet and an NSG with an inbound SSH allow rule. Then you will add compute resources including a public IP, a NIC, and a Linux VM with password authentication protected by the @secure() decorator. Finally, you will deploy the entire stack using az deployment group create and verify all resources and their relationships in the Azure Portal.

Objectives

Upon completing this beginner level lab, you will be able to:

  • Define a Virtual Network with subnets using Azure Bicep
  • Create a Network Security Group with an inbound SSH allow rule
  • Deploy a public IP address and a network interface card referencing the VNet and NSG
  • Provision a Linux Virtual Machine with password authentication using the @secure() parameter
  • Understand implicit resource dependencies via symbolic name references vs explicit dependsOn
  • Verify all deployed resources and their relationships in the Azure Portal

Who is this lab for?

This lab is designed for:

  • Cloud engineers who want to deploy real-world networking and compute infrastructure using Bicep
  • IT professionals looking to build multi-resource templates with proper dependency management

Verified against your live environment

An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.

[CHECK] validation_activelive
Inspecting deployed resources...
Verifying configuration state...
✓ Step requirements satisfied

More labs like this

Related reading

PremiumIncluded in Premium
Duration
60 min
Steps
4

Environment

Browser Code IDELive Cloud Environment

Every lab includes

  • Real environment, pre-credentialed
  • Automated checks on every step
  • Isolated sandbox, auto cleanup
  • AI-recommended next steps

Lab curriculum

  1. 01

    Logging into Azure CLI

  2. 02

    Writing Bicep for VNet Subnet and NSG Rules

    1 automated check

  3. 03

    Adding Public IP Network Interface and Linux VM

    1 automated check

  4. 04

    Deploying Full Stack and Verifying VM Resources

    1 automated check

Skills validated

Azure Virtual MachinesVirtual NetworksAzure Bicep

Not the lab you were looking for?

Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.

Explore the catalog