Skip to content

refactor(azure): standardize live env token on production (was prod)#47

Merged
stxkxs merged 1 commit into
mainfrom
refactor/azure-env-token-production
Jun 7, 2026
Merged

refactor(azure): standardize live env token on production (was prod)#47
stxkxs merged 1 commit into
mainfrom
refactor/azure-env-token-production

Conversation

@stxkxs

@stxkxs stxkxs commented Jun 7, 2026

Copy link
Copy Markdown
Member

What

production is the org-wide environment token — the AWS and GCP live trees, eks-gitops, kx, the tenant charts, eks-agent-platform, and eks-fleet all use it. The Azure live tree was the lone holdout on the short prod, breaking aks-gitops' "mirrors eks-gitops" contract.

  • Renamed the env dir live/azure/workload-prod/westus2/prod…/production (the workload-prod subscription alias is kept — same as AWS pairs a workload-prod account with a production env).
  • env.hcl: environment = "prod""production". This value is the cluster's environment secret label and feeds resource_group_name, so the RG, the …-aks cluster name, and every env-derived Azure resource name standardize with it.
  • Updated the shared _envcommon/azure/*.hcl cluster mock_outputs from the stale mock.oic.prod-aks… placeholder to production-aks.

Pairs with

aks-gitops#9 — standardizes the gitops side. Merge-coordinate: AKS clusters get labeled environment: production from this change, which is what makes aks-gitops' values-production.yaml / overlays/production resolve. Part of the aks-gitops#8 standardization.

Note

Renaming the env token shifts the Azure tfstate path key tfstate/prod/…tfstate/production/…; any previously-applied Azure prod state re-applies under the new key (greenfield-safe; accepted trade-off for cross-cloud parity).

Verification

  • Edited files (env.hcl, the 4 _envcommon mocks) are correctly terragrunt hcl-formatted; the repo-wide terragrunt-hcl format drift is pre-existing and not CI-gated (tofu fmt covers .tf).
  • Full prod-token sweep of the Azure live tree + _envcommon is clean — only the intentional workload-prod alias remains.

…`prod`)

`production` is the org-wide environment token — the AWS and GCP live trees, eks-gitops,
kx, the tenant charts, eks-agent-platform, and eks-fleet all use it. The Azure live tree
was the lone holdout on the short `prod`, which contradicted the multi-cloud parity the
stack is built around and broke aks-gitops' "mirrors eks-gitops" contract.

- Renamed the env directory `live/azure/workload-prod/westus2/prod` → `…/production`
  (the `workload-prod` subscription/account alias is kept, exactly as AWS pairs a
  `workload-prod` account with a `production` env).
- `env.hcl`: `environment = "prod"` → `"production"`. This value is the cluster's
  `environment` secret label and feeds `resource_group_name` (so the RG, the `…-aks`
  cluster name, and every env-derived Azure resource name standardize with it).
- Updated the shared `_envcommon/azure/*.hcl` cluster mock_outputs from the stale
  `mock.oic.prod-aks.azure.com` placeholder to `production-aks`.

Pairs with aks-gitops standardizing its env token (so AKS clusters get labeled
`environment: production` and the gitops `values-production.yaml` / `overlays/production`
resolve). Renaming the env token shifts the Azure tfstate path key `tfstate/prod/…` →
`tfstate/production/…`; any previously-applied Azure prod state re-applies under the new key.
@stxkxs stxkxs merged commit 43c320a into main Jun 7, 2026
226 checks passed
@stxkxs stxkxs deleted the refactor/azure-env-token-production branch June 7, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant