0010. Terraform bootstrap and GitHub OIDC
- Status: accepted
- Date: 2026-11-11
- Issue: #2
Context
As for Pixel (Pixel ADR 0008), Terraform state must not live on a laptop, and GitHub Actions must not hold an Azure password. Pixel's bootstrap already created the pixelbartfstate storage account, which spacestate also uses.
Decision
- State in
pixelbartfstate(resource grouppixel-bootstrap), in containerspixel-phone-bootstrap,pixel-phone-devandpixel-phone-prod, with Azure AD auth. infra/bootstrapis applied by hand by a subscription Owner. It creates resource groupspixel-phone-bootstrap(for identities),pixel-phone-devandpixel-phone-prod, and one user-assigned identity per environment for GitHub Actions.- Each identity is federated only to this repository's immutable OIDC subject for its GitHub Environment,
repo:pixelbar@1690472/pixel-phone@1453907426:environment:<env>, and is Contributor on its own environment's resource group only. - Env stacks deploy into those groups and don't create them. No Terraform apply runs from CD.
Consequences
- Someone with Owner runs the first apply and creates GitHub Environments
devandprod(required reviewers onprod). - Contributor can't create role assignments, so applies that add them (every env stack does) are run by a maintainer, not by CI.