IaC with GitHub Copilot β€” Workshop Home

Learn to author Azure Bicep with GitHub Copilot, and deploy it from GitHub Actions with no stored cloud credentials β€” one discipline per level: deploy, monitor, secure, protect.

[!IMPORTANT] Classroom students: everything is pre-staged. Your GitHub account already holds a fork of this repo, your Azure resource group already exists (it has your username’s name), and the deploy identity is already wired up. You can run the entire main path from the browser without installing anything. Running it on your own subscription instead? The self-hosted on-ramp is Windows 11 only (the helper scripts use winget); everything after setup is platform-agnostic.

Start where you are



New to all of this
Start with the "why", then deploy

Understanding IaC β†’


I know Azure, new to GitHub
Repos, Actions, secrets, OIDC

GitHub Essentials β†’


Just let me deploy
Two checks, then straight to L1.1

Start Here Checklist β†’

All three paths converge on the main path β€” one foundation chapter per level, west to east:

L1.1 Deploy β†’ L2.1 Monitor β†’ L3.1 Secure β†’ L4.1 Protect

Every level also goes deeper β€” optional chapters that raise the complexity, cost and prerequisites. The πŸ—ΊοΈ Curriculum Map shows all 22 chapters, what each needs, and what each costs.


🧱 The main path

Four stops, all deploying into your single assigned resource group, each teaching a new discipline on the environment the previous stop left behind:

flowchart LR
  M1["L1.1 Β· Deploy the core<br/>VNets, Bastion, one VM<br/>~$0.24/hr"]
  M2["L2.1 Β· Monitor it<br/>agent, data collection,<br/>diagnostics β†’ Log Analytics<br/>~$0.06/hr"]
  M3["L3.1 Β· Check its security<br/>posture workbook<br/>$0"]
  M4["L4.1 Β· Back it up<br/>Recovery Services vault,<br/>daily VM backup<br/>~$10/mo"]

  M1 --> M2 --> M3 --> M4

  classDef s1 fill:#eefaf0,stroke:#3a9d5d,color:#1a1a1a
  class M1,M2,M3,M4 s1

Text description of this diagram</summary>

Four chapters run left to right: L1.1 deploys the network core (hub and spoke VNets, Azure Bastion, one Linux VM). L2.1 monitors it (Azure Monitor Agent, a data collection rule, and diagnostic settings flowing into Log Analytics). L3.1 checks its security (an Azure Resource Graph posture workbook, at no cost). L4.1 protects it (a Recovery Services vault taking daily backups of the VM). Each chapter builds directly on the previous one and none requires anything else.

</details>

Stop Guide Requires What gets added Deploy time
L1.1 Core Deployment β€” VNets, Bastion, test VM ~15 min
L2.1 Monitoring Fundamentals L1.1 Monitor agent, data collection rule, Log Analytics ~5 min
L3.1 Security Foundation β€” Security posture workbook ~2 min
L4.1 Backup Fundamentals L1.1 Recovery Services vault, daily VM backup ~5 min

[!TIP] Want more? Each level goes deeper β€” L1.2 adds an Azure Firewall and web tier, L1.3 a full multi-service app, L2.2–L2.4 turn monitoring data into answers, and Levels 5 (Sentinel) and 6 (Recovery) are extra-credit tracks. Depth costs more and depends on more: the Curriculum Map shows every chapter’s price and prerequisites before you commit. The expensive detour to know about: L1.2’s firewall is $1.25/hr on its own, and nothing requires it.


πŸš€ Three ways to work (every chapter offers all three)

Β  βš™οΈ GitHub Actions πŸ€– GitHub Copilot πŸ”§ Bicep CLI
How Click Run workflow in your fork’s Actions tab Describe changes in plain English, review, push, then deploy via Actions Copy-paste terminal commands
Best for The classroom main path β€” zero setup Exploring and modifying the templates Seeing every step
Deploys run on GitHub’s runners, as your own workshop identity GitHub’s runners (Copilot edits, Actions deploys) Your machine, as you
Classroom? βœ… Yes β€” this is your path βœ… Authoring yes; deploying goes through Actions ⚠️ No β€” deploying locally needs Azure write access your classroom account doesn’t have

Classroom accounts hold Reader in Azure. You can look at everything in the portal, but only your workshop deploy identity β€” which your fork’s workflows use automatically β€” can create resources. That is why the Actions button is the way, and why local az deployment commands from the chapter pages are for self-hosted use. (Local az bicep build β€” compiling β€” works for everyone; compiling needs no Azure at all.)


πŸ€– The Copilot workflow

Each chapter provides agent-mode prompts. In VS Code:

  1. Press Ctrl+Alt+I β†’ switch the dropdown to Agent.
  2. Paste the chapter prompt. Copilot reads the repo, edits Bicep files, and runs az bicep build to verify.
  3. Review every diff β€” you are the reviewer. Never accept blindly.
  4. Commit, push to your fork, then run the chapter’s GitHub Actions workflow.

[!IMPORTANT] Copilot is your pair programmer, not an autopilot. Its suggestions may need adjustment β€” catching and fixing those is part of the learning.


βœ… Before your first deploy

Classroom β€” three checks, no installs:

  • Signed in to GitHub as your workshop account (e.g. student01)
  • You can see your fork: github.com/<your-account>/Demo-IaC_Demo_with_VSCode
  • On the fork’s Actions tab, workflows are enabled (one green button click the first time)

Then open L1.1 and run your first deployment. The workflow already knows your resource group (it is named after your account) and everything else it needs.

Self-hosted β€” running this on your own subscription</summary>

  • Tools installed β€” run ./scripts/Install-LabTools.ps1 (one command, Windows with admin rights)
  • Repo forked, cloned, opened in VS Code, Copilot signed in
  • az login + gh auth login done
  • A resource group created, and OIDC wired up via ./scripts/Setup-Oidc.ps1 -ResourceGroup "<your-rg>" -Prefix "<yourname>"

The full walkthrough is in the Deployment Guide.

</details>


πŸ›Ÿ When things break

Check Troubleshooting. Done for the day? Run the β€œTeardown labs” workflow in your fork’s Actions tab β€” it deletes everything inside your resource group (dry-run first, by default). Self-hosted users can also run ./scripts/Cleanup-Labs.ps1 -ResourceGroup <your-rg> locally.

[!WARNING] Azure Firewall (~$1.25/hr), Bastion, Front Door, and SQL all bill while running. Do not leave them deployed overnight.



GitHub feature spotlight Β· A docs site built from a folder

You just used it: every page you are reading is a Markdown file in the repository under docs/wiki/. This one is index.md. Find it: .github/workflows/pages.yml builds that folder into this GitHub Pages site on every push to main that changes it, so a page change is reviewed in a pull request like code. Beyond the lab: docs that live in git get diffs, history and pull requests. Documentation stops being the thing nobody can review. Docs β†’


On this site

Start here

  1. Home
  2. Start Here β€” Checklist
  3. Checklist β€” Part 2
  4. Deployment Guide

🧭 Main path β€” go east

One foundation chapter per level, in order. Same environment, a new discipline each stop.

Β  Chapter Cost
1️⃣ L1.1 β€” Deploy the core ~$0.24/hr
2️⃣ L2.1 β€” Monitor it ~$0.06/hr
3️⃣ L3.1 β€” Check its security $0
4️⃣ L4.1 β€” Back it up ~$10/mo

Extra credit: L5.1 β€” Sentinel Β· L6.1 β€” HA audit

πŸ—ΊοΈ Curriculum Map β€” all 22 chapters, with costs and prerequisites

⬇️ Go deeper β€” go south

Optional depth per level. Costs and prerequisites rise as you descend β€” check the map first.

Level 1 Β· Deploy β€” running cost with everything above still deployed:

Β  Deeper chapter Running cost
🟑 L1.2 β€” Firewall + web tier ~$1.65/hr
🟠 L1.3 β€” Multi-service app ~$1.73/hr
πŸ”΄ L1.4 β€” Production platform ~$1.84/hr

πŸ”΄ = L1.2’s Azure Firewall is $1.25/hr on its own β€” nothing requires it; tear it down promptly.

Background

Reference

Instructors


Done for the day? Tear it down β€” Firewall, Bastion, SQL and Front Door all bill while idle.

Repository Β· Cost breakdown Β· Report a problem with these docs

Built entirely from Azure Verified Modules. Prices verified against the Azure retail price list on 4 August 2026 (East US 2). These pages are built from docs/wiki/ in the repository β€” edit them there, through a pull request.