Start Here Checklist β Part 2
Continue here after finishing Start-Here Checklist sections A through D β or, if you are a classroom participant, jump straight to Section H below.
β Already done for you (classroom)
Two whole setup chapters of this page do not apply to classroom accounts, because they were done before you arrived:
- Your fork already exists at
github.com/<your-account>/Demo-IaC_Demo_with_VSCodeβ nothing to fork, no script to run. - The deploy identity is already wired. Your own workshop identity carries a federated credential for your fork, and your instructor set its three IDs (
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_SUBSCRIPTION_ID) and yourAZURE_PREFIXon your fork, or sent them to you to add as repository variables. The workflows work out everything else β target resource group (your account name) and prefix β and generate a one-time VM/SQL password per run unless you set your ownVM_ADMIN_PASSWORD/SQL_ADMIN_PASSWORDsecret.
Your classroom path on this page: Section F (optional β only if you want the Copilot/CLI experience), then Section H β your first deploy.
The fork-and-OIDC setup lives on under Self-hosted setup (Sections E & G) for people running on their own subscription.
π» F. Clone your fork to C:\Users\Public β only needed for the Copilot/CLI path
[!NOTE] Classroom: this section is optional. Deploying and verifying happens entirely in the browser (Actions tab + Azure portal). Clone only if you want to edit Bicep locally with VS Code and Copilot.
You have two ways to clone. Both end with the same folder: C:\Users\Public\Demo-IaC_Demo_with_VSCode.
[!IMPORTANT] Why not the Desktop? On these lab machines the Desktop is synced by OneDrive under a shared Microsoft account, so a git repo cloned there syncs its
.gitfolder across every station β git operations race the sync client and clones cross-contaminate between lanes.C:\Users\Publicis local to each machine and never syncs.
Β Option A Β· Terminal clone (recommended)
[!NOTE] Best if you like the command line. One command, stays in PowerShell, and sets up both
originandupstreamremotes in one go.
Open a new PowerShell 7 window and run (replace <your-username> with your GitHub account name):
cd $env:PUBLIC
gh repo clone <your-username>/Demo-IaC_Demo_with_VSCode
cd .\Demo-IaC_Demo_with_VSCode
git remote add upstream https://github.com/HybridCloudWorks/Demo-IaC_Demo_with_VSCode.git
git remote -v
Expected output from git remote -v:
origin https://github.com/<your-username>/Demo-IaC_Demo_with_VSCode.git (fetch)
origin https://github.com/<your-username>/Demo-IaC_Demo_with_VSCode.git (push)
upstream https://github.com/HybridCloudWorks/Demo-IaC_Demo_with_VSCode.git (fetch)
upstream https://github.com/HybridCloudWorks/Demo-IaC_Demo_with_VSCode.git (push)
Then set your fork as the default repo for gh commands. Because you have two remotes (origin and upstream), gh will ask you to pick every time unless you set this once:
gh repo set-default <your-username>/Demo-IaC_Demo_with_VSCode
You should see: β Set <your-username>/Demo-IaC_Demo_with_VSCode as the default repository for the current directory
Β Option B Β· GitHub Desktop clone (visual)
[!TIP] Best if you prefer a visual, point-and-click approach. GitHub Desktop handles the clone β you then add the upstream remote in one terminal command.
Clone in GitHub Desktop:
- Open GitHub Desktop
- Click File β Clone repositoryβ¦
- Select the URL tab
- Paste your fork URL:
https://github.com/<your-username>/Demo-IaC_Demo_with_VSCode - Set Local path to
C:\Users\Public(type it in, or click Chooseβ¦ and navigate to This PC > Windows (C:) > Users > Public) (GitHub Desktop appends the repo name β your final folder will beC:\Users\Public\Demo-IaC_Demo_with_VSCode) - Click Clone
Then add the upstream remote and set your fork as default (run inside the cloned folder):
cd "$env:PUBLIC\Demo-IaC_Demo_with_VSCode"
git remote add upstream https://github.com/HybridCloudWorks/Demo-IaC_Demo_with_VSCode.git
git remote -v
gh repo set-default <your-username>/Demo-IaC_Demo_with_VSCode
- Folder
Demo-IaC_Demo_with_VSCodeexists inC:\Users\Public git remote -vshows bothorigin(your fork) andupstream(instructorβs repo)gh repo set-defaultconfirmed your fork as the default repo- Open the cloned folder in VS Code:
code "$env:PUBLIC\Demo-IaC_Demo_with_VSCode"β accept the recommended extensions prompt.
π H. First deploy (L1.1) β the classroom step
This is the whole classroom setup. Everything runs in the browser:
- On GitHub β signed in as your workshop account β open your fork and click Actions, then the green βI understand my workflows, go ahead and enable themβ button if prompted (forks disable workflows by default).
- Run Curriculum L1.1 - Core Deployment β Run workflow β Run workflow. (No inputs needed β it targets the resource group named after your account automatically.)
- Watch the What-if step β it lists every resource that will be created. Read it before the deploy step runs.
- Green check on all three stages (Lint β What-if β Deploy)? π Continue with the L1.1 guide.
π§° Self-hosted setup (Sections E & G)
Everything below is for people running the workshop on their own subscription. Classroom accounts skip it entirely β see Already done for you above.
π΄ E. Fork the repo to your GitHub account (self-hosted)
Why fork and not just clone? GitHub Actions workflows run under the repo they live in. Your fork is your personal copy with its own workflow runs and its own configuration.
From PowerShell in your bootstrap folder, run:
cd "$env:PUBLIC\Demo-IaC-Bootstrap"
Invoke-WebRequest "https://raw.githubusercontent.com/HybridCloudWorks/Demo-IaC_Demo_with_VSCode/main/scripts/Connect-AzureAndGitHub.ps1" -OutFile .\Connect-AzureAndGitHub.ps1
./Connect-AzureAndGitHub.ps1
What this script does:
- Validates your Azure CLI authentication (from Section D)
- Validates your GitHub CLI authentication (from Section D)
- Creates your fork at
https://github.com/<your-username>/Demo-IaC_Demo_with_VSCode(if not yet forked) - Installs/verifies the
gh copilotCLI extension
When it finishes you will see:
> Forking the lab repo to your account
[OK] Fork is ready at: https://github.com/<your-username>/Demo-IaC_Demo_with_VSCode
[INFO] Use that URL in Section F of the checklist when cloning your copy of the repo.
- Script completes with
[OK] Fork is ready(no red[FAIL]lines) - No
[WARN] Azure CLI was NOT validatedat the end. Forking only needsgh, so the script finishes without Azure CLI β butSetup-Oidc.ps1in Section G will fail without it. If you see that warning, go back to Sections C and D. - Your fork URL is shown in the terminal β copy it, you will use it in Section F
[!NOTE] Already have a repo called
Demo-IaC_Demo_with_VSCode? The script checks that the repo in your account is genuinely a fork of this workshop, not just a name match. It warns and keeps going rather than stopping β but read the warning, because it means the URL it prints is the wrong repo. Rename or delete that repo and re-run; otherwise every later step (gh repo set-default, the OIDC credential, the deploy workflows) points at a repo with none of the labβs workflows in it.
If your environment blocks script downloads in the terminal, download
Connect-AzureAndGitHub.ps1in a browser, save it toC:\Users\Public\Demo-IaC-Bootstrap\, then run it.
π G. Wire up GitHub β Azure (OIDC, one-time β self-hosted)
Before running any command in this section, move into the cloned repo folder:
cd "$env:PUBLIC\Demo-IaC_Demo_with_VSCode"If you see
fatal: not a git repository, you skipped Section F β go back and clone your fork first.
This creates a passwordless identity that GitHub Actions uses to deploy to Azure. All labs deploy into your single resource group β they do not create their own.
Create the resource group first β the group must already exist, and no lab creates it:
az group create --name "<your-rg>" --location eastus2
Then run Setup-Oidc. -ResourceGroup controls where permissions are scoped; -Prefix controls unique naming (Entra app + lab resource names).
[!TIP] Optional preview (
-WhatIf) β safe dry run. You should only see planned actions, with no changes applied.
./scripts/Setup-Oidc.ps1 -ResourceGroup "<your-rg>" -Prefix "<yourname>" -WhatIf
Run for real
./scripts/Setup-Oidc.ps1 -ResourceGroup "<your-rg>" -Prefix "<yourname>"
Verify (run this only after the script completes)
gh secret list
gh variable list
gh secret listshows all 6 secrets:AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_SUBSCRIPTION_ID,AZURE_RESOURCE_GROUP,VM_ADMIN_PASSWORD,SQL_ADMIN_PASSWORDgh variable listshowsAZURE_PREFIXandAZURE_LOCATION
(This 6-secret state is self-hosted only. On a classroom fork you will see just the three AZURE_*_ID names your instructor set, as secrets or variables β the workflows derive or generate the rest.)
Full walkthrough and manual steps: Deployment Guide. Instructor pre-lab setup: Instructor Setup.
Quick βam I ready?β self-test
| Question | Where to fix if βnoβ |
|---|---|
Signed in to GitHub as my workshop account (e.g. student01)? (classroom) | Sign out and back in with the account your instructor gave you |
My fork exists at github.com/<me>/Demo-IaC_Demo_with_VSCode? | Classroom: pre-created β check you are signed in as the right account. Self-hosted: Section E |
| The Actions tab shows the deploy workflows (not blocked)? | Section H β click the green enable button |
gh secret list or gh variable list on my classroom fork shows AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_SUBSCRIPTION_ID? | If they are in neither list, deploys stop at Check Azure sign-in settings β ask your instructor to set them. Set AZURE_PREFIX from your instructorβs values too: it keeps your resource names unique in the subscription |
| (Copilot/CLI path) Local clone exists in C:\Users\Public? | Section F |
(Copilot/CLI path) git remote -v shows both origin and upstream? | Section F |
(Copilot/CLI path) gh repo set-default points to my fork? | Section F |
(Self-hosted) gh secret list shows AZURE_RESOURCE_GROUP and 5 others? | Section G |
(Self-hosted) gh variable list shows AZURE_PREFIX and AZURE_LOCATION? | Section G |
Stuck on any of these β Troubleshooting.
β‘οΈ Ready? Head to L1.1 β Core Deployment and run your first deploy. The main path continues east: L1.1 β L2.1 β L3.1 β L4.1 β see the Curriculum Map.
GitHub feature spotlight Β· Secrets versus variables
You just used it β almost without needing it: a classroom fork carries only the three IDs that name the deploy identity. The workflows read every other value through a fallback path, and when no password secret is set they generate a random one for that run instead of using a guessable default. Authentication happens through a federated trust rather than a stored credential, so there is no cloud password to push into your fork. Self-hosted forks are the contrast: there
Setup-Oidc.ps1pushes both kinds βAZURE_PREFIXandAZURE_LOCATIONas variables (they appear in resource names and logs anyway), passwords and IDs as secrets. Find it: Settings β Secrets and variables β Actions. You can read a variable back; you can never read a secret back, only replace it. In a run log a secret prints as***, automatically. Beyond the lab: the test is simple β if someone leaking it would cause harm, it is a secret; if you would happily print it in a log, it is a variable. And a fallback default in the workflow file is how you make secrets optional without making them impossible. Docs β