avd-opsDeploy quietly
Community research project. Use at your own risk. No warranty.Use at your own risk
  • Built on my own time for research and learning. Not affiliated with, endorsed by or supported by my employer or Microsoft.
  • Don't run any of it in production or against tenants that matter. Test in a dedicated lab subscription and tenant first.
  • Provided "as is", without warranty of any kind, under each repo's license. You use it at your own risk and own the Azure charges it incurs.
  • Contributions and forks are welcome and encouraged. See Contribute.

Run the AVD repos in GitHub Codespaces

A codespace is a Linux machine GitHub runs for you, with an editor in the browser. It keeps your files between sessions and keeps running for up to 4 hours after you go quiet.

More

This is the second of the options. A personal GitHub account gets 120 core-hours (60 hours on the 2-core machine) and 15 GB-month of storage a month at no cost, and without a payment method on file GitHub blocks use at that quota instead of billing you (Codespaces billing, checked 2026-11-23).

1. Put the setup in a repo you own ($0)

Copy the avd-ops dev container into your own fork or private companion repo. A codespace is always created on a repo, and it reads its setup from that repo.

More
  • What it installs: PowerShell 7 as the default terminal, Azure CLI with Bicep, GitHub CLI, and the Az sign-in, Graph sign-in, Pester and PSScriptAnalyzer modules, on a 2-core machine. Source: templates/codespaces.
  • Where: copy its .devcontainer folder to the root of a repo in your personal account, such as your fork of avd-landing-zone or your private companion repo.
  • Why your own account: the free allowance belongs to personal accounts. Organization plans don't include one, so a codespace on an organization's repo can bill that organization or you.

2. Keep it at $0 ($0)

Leave no payment method on file, or set a $0 Codespaces budget. Then pick an idle timeout and how long stopped codespaces are kept.

More
  • Spending: with no payment method, use stops at the free quota. With one, set a Codespaces budget in your billing settings (budgets).
  • Idle timeout: in your Codespaces settings, from 5 to 240 minutes; the default is 30. A codespace also stops after 12 hours whatever you set (timeout).
  • Retention: stopped codespaces are deleted after 30 days by default; you can choose 0 to 30 days (automatic deletion). A stopped codespace bills storage only.

3. Create the codespace and sign in ($0 inside the allowance)

Open your repo on GitHub, select Code, then Codespaces, then Create codespace. The first build takes a few minutes.

More
  • Clone the AVD repos into /workspaces. Files there survive a rebuild; anything else outside /workspaces doesn't. For example, git clone https://github.com/avd-ops/avd-landing-zone.git /workspaces/avd-landing-zone.
  • Sign in with a device code: Connect-AzAccount -UseDeviceAuthentication for the PowerShell scripts and az login --use-device-code for the CLI. Unlike Cloud Shell, a codespace isn't signed in to Azure for you.
  • Missing module? If a script asks for one, add it to the modules list in .devcontainer/devcontainer.json and rebuild the container.
  • Never commit a token. Keep secrets out of the repo; use Codespaces secrets if a step needs one.

4. Work, stop, delete

Closing the tab doesn't stop the codespace; the idle timeout does. Stop it when you're done, and delete it when you won't come back.

More
  • Long runs: set the idle timeout longer than the run, up to 4 hours. Anything longer belongs in Azure or GitHub Actions (long jobs).
  • What stops loses: running processes and what's on screen. Your files, and your terminal history, are there when you start it again (lifecycle).
  • Stop and delete from your list of codespaces on GitHub. Deleting ends storage billing.
  • On an iPad: codespaces open in a browser, but we haven't tested one on an iPad yet.
Linked from 2 pages