refactor: reorganize terraform roots by domain (strata-prefixed)#35
Merged
Conversation
Reorganize all Terraform roots into a domain/strata layout: - state/ → 00-remote_state/ (backend S3 bucket + S3 lister IAM role) - aws-github-oidc/ → 01-iam/aws/ (GitHub OIDC + role-creator) - github-ci/ → 01-iam/scaleway/ (Scaleway IAM identity for CI) - cluster/local/ → 02-cluster/local/ - cluster/scaleway/ → 02-cluster/scaleway/ (rewritten with ArgoCD bootstrap) Each root gets an env/ folder replacing the old workspace/ convention. Consolidate CI workflows (drop aws-auth-check, scaleway-auth-check, s3-lister-role; add iam_terraform-backend-role). Update CLAUDE.md, README.md, and mise.toml to reflect the new layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New root that provisions the Infisical machine identity used by other Terraform roots to fetch secrets (ArgoCD admin password hash, API keys). Outputs the machine identity ID for downstream consumption. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nbrieussel
force-pushed
the
chore/restructure-terraform-roots
branch
from
June 18, 2026 15:32
2e8abad to
719f16b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The top-level Terraform roots had grown into a flat, unstructured set. This
reorganizes them by domain (top-level folder = responsibility) with a
numeric strata prefix on each root (apply order / blast-radius / who applies
it).
cluster/*is left untouched.New layout
Zero state migration (the key design point)
State is addressed by the backend config, not the directory path. Every root
keeps its existing
workspace_key_prefix, so the relocated roots bind totheir existing remote state with no migration — this is a pure
git mv. Theprefix now intentionally differs from the path (documented in each
version.tf).No resources are recreated → all ARNs/keys stay stable (
AWS_GITHUB_ACTIONS_ROLE_ARN,AWS_S3_LISTER_ROLE_ARN, GitHub secrets, the s3-lister trust). Noterraform_remote_statecoupling exists between roots, so no cross-root lookups break.Reference updates
github-ci-*→scaleway-ci-*,aws-github-oidc-*→ci-trust-*.mise run locklist, boundary-contract path.terraform-lockmatrix,s3-lister-role.ymlcomposite-actionroot:input.modules/README.md.Test
terraform fmt -check✓ · each moved rootinit -backend=false && validate✓ ·actionlint✓terraform-lockmatrix,and
s3-lister-role.ymlappliesstate/10-accessagainst its unchangedstate key → proves the relocated root still binds to existing state (expect a
no-op apply).
aws sso login, thenterraform -chdir=<moved-root> init && plan→ no changes.Notes
ci/10-scaleway/main.tfstill say(managed by terraform: github-ci/). Leftas-is on purpose — editing a resource argument would force a plan diff, breaking
the "pure move, zero change" guarantee. Fix in a later trivial apply if desired.
openspec/changes/terraform-ci-*reference
github-ci/; they'd later targetci/11-scaleway-tf. Out of scope.