Copy this checklist when setting up environments for this repo.
For workflow behavior (dev/staging/prod triggers, PR label run-staging, and smoke-test flow), see CI_CD.md.
Add these as Environment secrets in GitHub:
- Settings → Environments → dev → Environment secrets
- Settings → Environments → staging → Environment secrets
- Settings → Environments → prod → Environment secrets
This workflow is environment-based (
environment: dev|staging|prod), so each environment should have the full secret set.
-
AZURE_CLIENT_ID -
AZURE_TENANT_ID -
AZURE_SUBSCRIPTION_ID -
TF_BACKEND_RG -
TF_BACKEND_SA -
TF_BACKEND_CONTAINER -
AZURE_OPENAI_ENDPOINT -
AZURE_OPENAI_API_KEY -
AZURE_OPENAI_EMBEDDING_ENDPOINT(optional — set only if embeddings use a different Azure OpenAI resource) -
AZURE_OPENAI_EMBEDDING_API_KEY(optional — set only if embeddings use a different API key) -
AIGATEWAY_KEY
These are required by .github/workflows/deploy-grafana-dashboards.yaml:
-
GRAFANA_URL(Grafana Cloud stack URL, e.g.https://pvc-aigateway.grafana.net) -
GRAFANA_SA_TOKEN(Grafana service account token with dashboard import permissions)
You can source values from infra/grafana outputs:
terraform -chdir=infra/grafana output -raw stack_urlterraform -chdir=infra/grafana output -raw github_actions_token
-
STATE_SERVICE_SHARED_TOKEN(shared token injected by dashboard proxy and validated by state-service for trusted internal calls) -
STATE_SERVICE_REGISTRY_PASSWORD(GHCR token/PAT withread:packagesscope for private state-service image pulls)
When STATE_SERVICE_CONTAINER_IMAGE is set to a private image, add repository/environment variable:
-
STATE_SERVICE_REGISTRY_USERNAME(GHCR username/owner; defaults to repository owner when not set)
When STATE_SERVICE_CONTAINER_IMAGE is set (state-service enabled), set this secret to a strong random value.
Use this block as a setup checklist when creating/updating dev, staging, and prod:
AZURE_CLIENT_ID=<GUID>
AZURE_TENANT_ID=<GUID>
AZURE_SUBSCRIPTION_ID=<GUID>
TF_BACKEND_RG=<resource-group-name>
TF_BACKEND_SA=<storage-account-name>
TF_BACKEND_CONTAINER=tfstate
AZURE_OPENAI_ENDPOINT=https://<your-resource>.cognitiveservices.azure.com
AZURE_OPENAI_API_KEY=<key>
AZURE_OPENAI_EMBEDDING_ENDPOINT= # optional: only if embeddings are on a different resource
AZURE_OPENAI_EMBEDDING_API_KEY= # optional: only if embeddings use a different key
AIGATEWAY_KEY=<gateway-key>
STATE_SERVICE_SHARED_TOKEN=<strong-random-token> # optional, recommended if state-service is enabled
STATE_SERVICE_REGISTRY_PASSWORD=<ghcr-read-packages-token> # required for private state-service images
# Optional repo/environment variable:
# STATE_SERVICE_REGISTRY_USERNAME=<ghcr-username-or-org>
-
AZURE_OPENAI_ENDPOINTandAZURE_OPENAI_API_KEYare from the same Azure OpenAI resource. -
AZURE_OPENAI_ENDPOINTis base URL only (no/openai/...path). - If embeddings live on a different Azure OpenAI resource, set
AZURE_OPENAI_EMBEDDING_ENDPOINT(and optionallyAZURE_OPENAI_EMBEDDING_API_KEY). Otherwise leave them blank to use the main endpoint. - For
prod,AZURE_OPENAI_ENDPOINThost ismys-prod-ai-san.cognitiveservices.azure.com. -
AIGATEWAY_KEYmatches the key expected by the deployed gateway. - OIDC federated credentials exist for each environment subject:
repo:phoenixvc/ai-gateway:environment:devrepo:phoenixvc/ai-gateway:environment:stagingrepo:phoenixvc/ai-gateway:environment:prod
- Staging deploy on PRs into
mainis controlled by PR labelrun-staging. - Add label
run-stagingto enabledeploy-stagingfor that PR. - Remove label
run-stagingto skip staging for that PR.
For OIDC troubleshooting, see AZURE_OIDC_SETUP.md.