Pre-Requisites
- Modern Web Browser
- Azure Subscription with a Service Principal with Contributor permissions
az ad sp create-for-rbac --name "codespaces-workshop" --role Contributor --scopes /subscriptions/<SUBSCRIPTION_ID> --sdk-auth
- Save above output for GitHub setup
- Register the following providers with
az
if not already registered
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.OperationalInsights
- Storage Account in the sub for state management
- Resource Group: “codespaces-demo-resources”
- Storage Account Name: “codespacesstate$POSTFIX” where $POSTFIX is some random slug
- Container Name: “codespacesstate”
- Public network access
- Container should have private access only
- Organization w/Codespaces enabled
- Azure Subscription SP details as GitHub Org Secrets
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET
- AZURE_SUBSCRIPTION
- AZURE_TENANT_ID
- Setup tested with “Workshop Setup Test” Action from workshop repo. Modify
setup-test/backend.tf
, in a copy of the workshop template, appropriately to reflect Storage Account name