- IaC: OpenTofu (Terraform fork) with Cloudflare + AWS providers
- State: Cloudflare R2 bucket (shared across all providers)
- Env:
.env.local(not.env), loaded via direnv - OpenTofu version: pinned in
.opentofu-version(repo root) — the single source CI reads viasetup-opentofu'stofu_version_file. Bumping across a minor (1.12 → 1.13) also requires updatingrequired_versionin all five roots (terraform/{gcp,aws,azure}/provider.tf,terraform/{bootstrap,cloudflare}/versions.tf), which is deliberately bounded (~> 1.12) so an unintended jump fails loudly atinit.
just cloudflare— plan and apply Cloudflare resourcesjust aws— plan and apply AWS resourcesjust bootstrap— bootstrap initial Cloudflare resources (R2, tokens)- Manual:
tofu -chdir=terraform/cloudflare init/plan/apply
- Never push directly to main — all changes via PR
- Never merge to main locally — push the branch and open a PR instead. When finishing a branch, default to creating a PR without asking.
- Branch naming:
feature/add-xyz,fix/broken-xyz - Conventional commits:
feat:,fix:,chore: - Merge PRs with
--merge(never--squashor--rebase)
- Canonical location: worktrees go in
.claude/worktrees/<name>/(repo-relative), one per branch — gitignored by the narrow.claude/worktrees/rule, and the same convention across all trakrf repos (docs/platform/infra). The ignore is deliberately narrow (matching trakrf/docs) so the rest of.claude/stays tracked and shared agent config is versioned:.claude/csw.json(csw workflow config — tracker, base branch, validate command) and.claude/csw-validate.sh(local mirror of.github/workflows/ci.yml; run it before opening a PR). - Create with the native
EnterWorktreetool (writes to.claude/worktrees/<name>, auto-creates branchworktree-<name>— rename to afeat/.../fix/...branch after if desired). Do NOT use manualgit worktree add, and do NOT create a.worktrees/dir or a.claude/worktrees -> ../.worktreessymlink (fresh-clone footgun). Manualgit worktreeis only the superpowers fallback for harnesses with no native tool — not us. - Cleanup:
git worktree listis authoritative (empty leftover dirs are not worktrees); useExitWorktree(orgit worktree remove) to leave/remove.
terraform/bootstrap/— one-time Cloudflare setup (R2 state bucket, API tokens)terraform/cloudflare/— Cloudflare infrastructure (DNS, Pages, email)terraform/aws/— AWS infrastructure (Route53, EKS)terraform/gcp/— GCP infrastructure (future)helm/— Helm charts (future)argocd/— ArgoCD application manifests (future)
tofu -chdir=terraform/cloudflare state listtofu -chdir=terraform/cloudflare state show <resource>just s3-ls
- If you'll want it tomorrow, Terraform it today — dashboard is for exploration only
- No GitOps yet — manual
just cloudflare/just awsto apply - Repo remote:
git@github.com:trakrf/infra.git
- Run
tofu planbefore claiming completion - Report actual plan output — no false optimism