Hands-on lab for Azure deployment patterns: Terraform IaC, GitHub Actions OIDC pipelines, and a FastAPI service evolving from App Service to containers to serverless.
- v1 – App Service (code deploy)
- v2 – Container Apps
- v3 – Azure Functions
Requires uv and Python 3.12 (matches the Azure runtime).
uv python install 3.12
uv venv --python 3.12 .venv
source .venv/bin/activate # once per terminal
uv pip install -r requirements-dev.txtRun the API, then open http://127.0.0.1:8000/health:
uvicorn main:app --reload --app-dir src/apiRun the tests from the repo root:
pytestdocs/pipeline.md— how changes flow from PR → dev → staging → prod
- dev → staging → prod: one subscription, with a separate resource group, state container and deploy identity per environment. Each identity can only touch its own environment. Dev accepts branch builds; staging and prod take
mainonly, and prod waits for manual approval.