# Infrastructure root — canonical map

**One root: `infra/`.** The R-6 consolidation is complete (both halves landed
2026-07-18 — `infrastructure/*` and `deploy/*` absorbed; retired roots are
resurrection-guarded in `scripts/check-forbidden-paths.sh`). This file is the
authoritative statement of what is live where. History of the moves is in the
Consolidation status section below.

## Live trees and their owners

| Tree                                                                                           | Status                                                                                                                                                                                                                                  | Consumers                                                                 |
| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `infra/terraform-v1` (absorbed from `infrastructure/terraform`, 2026-07-18)                    | **Canonical V1 platform IaC** (ECS Fargate, RunPod, Amplify, RDS/ElastiCache/S3). Owns the `oshun-terraform-state-*` backends.                                                                                                          | `deploy-ecs.yml`, `terraform.yml`, `psyche-*` workflows                   |
| `infra/terraform`                                                                              | Subsystem IaC: iris (`iris-iac-modules.yml`, `iris-*-deploy.yml`, drift detection), RunPod endpoints (`runpod-endpoint-*.yml`, `deploy-runpod.yml`), GitHub-OIDC roles (`github-oidc/`, sources `infra/terraform/modules/github-oidc`). | iris + runpod + model-sync workflows                                      |
| `infra/k8s`, `infra/monitoring`, `infra/runpod`, `infra/models`, `infra/a11y-reports`          | Live subsystem assets.                                                                                                                                                                                                                  | iris/psyche charts, monitoring config, `a11y-pa11y-nightly.yml`           |
| `infra/hetzner`                                                                                | Live single-box Hetzner deployment path.                                                                                                                                                                                                | `deploy-hetzner.yml` (see `V1/planning/HETZNER_SINGLE_BOX_2026-07-09.md`) |
| `infra/{releases,elk,kind,themis,nous,nyx,yemaya,bellona-remote,neith-crash}`, `infra/compose` | Per-domain deploy assets (absorbed from `deploy/*` 2026-07-18), unaudited individually — treat as live.                                                                                                                                 | various                                                                   |
| `infra/vault-deploy`, `infra/k8s-deploy`                                                       | Absorbed from `deploy/vault` and `deploy/k8s` respectively; NOT duplicates of `infra/vault` (psyche vault infra) / `infra/k8s` (subsystem charts) — same names, different origins. A second-pass merge per owner window is the target.  | various                                                                   |
| `infra/helm/maya-orchestration` (absorbed 2026-07-18)                                          | Last live remnant of the helm tree (see its `DEPRECATED.md`).                                                                                                                                                                           | maya                                                                      |
| `infra/{psyche,vault}` (absorbed 2026-07-18)                                                   | Live psyche/vault infra.                                                                                                                                                                                                                | psyche workflows                                                          |

## Removed

- `deploy/terraform` — legacy EKS/service-mesh/multi-region design, deprecated
  2026-07-04, deleted 2026-07-16 (its own `DEPRECATED.md` declared git history
  the reference copy). Its one load-bearing piece, `modules/github-oidc`, moved
  to `infra/terraform/modules/github-oidc` (consumer:
  `infra/terraform/github-oidc/main.tf`).

## Consolidation status

**2026-07-18: the `infrastructure/*` half landed.** `infrastructure/terraform` →
`infra/terraform-v1`, `infrastructure/helm` → `infra/helm`,
`infrastructure/psyche` → `infra/psyche`, `infrastructure/vault` →
`infra/vault`; the `infrastructure/` root is retired (guarded in
`scripts/check-forbidden-paths.sh`). Verified offline:
`terraform init -backend=false && terraform validate` green on the moved root
and its bootstrap; phase-12/49 checkers and the maya iac-templates spec green;
all five consuming workflows repointed (`terraform.yml`'s push job is
validate-only and `deploy-ecs.yml` is dispatch-only, so no unwatched apply can
fire from the move). State backends are S3-keyed and path-independent — the
first dispatched `terraform plan` after this change is the final confirmation.

**2026-07-18 (later): the `deploy/*` half landed too — R-6 is complete.**
`deploy/v1/hetzner` → `infra/hetzner`, `deploy/kubernetes` → `infra/k8s-deploy`,
`deploy/vault` → `infra/vault-deploy` (existing `infra/vault` kept), root
compose files → `infra/compose/`, per-domain trees → `infra/<domain>/`; the
`deploy/` root is retired and resurrection-guarded. Owner confirmed prelaunch,
dissolving the deploy-window gate. Verified: operations suites 20/20, phase-98
evidence regenerated (its checker round-trips current paths), phase-21's red
pre-exists at HEAD, domains verifier and forbidden-paths guard green. One
infrastructure root remains: `infra/`.

Historical note — the original gating: `deploy-hetzner.yml` auto-fires on main
pushes (see `docs/audits/SERVICES_TO_APPS_MIGRATION_RUNBOOK_2026-07-18.md`).

## Target end-state (audit R-6, deploy/\* half pending the Hetzner window)

One root — `infra/` — absorbing `infrastructure/*` (as `infra/terraform-v1`,
`infra/helm`, `infra/psyche`, `infra/vault`) and `deploy/*` (as `infra/hetzner`,
`infra/releases`, `infra/compose`, per-domain under `infra/<domain>/`). Moving
`infrastructure/terraform` requires updating `deploy-ecs.yml`, `terraform.yml`,
and the psyche workflows in the same change, and should be exercised against a
real `terraform plan` (state backends are path-independent, but workflow
working-directories are not). Do not partially move it.
