You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workspace init from Terraform Cloud, Spacelift or Backstage, and workspace promote up the kind ladder #3178
Part of the boundaries epic, #3166 (infra/platform teams).
Problem
chant workspace init proposes a declaration from what's already in a repo, without running code. The terraform lexicon supplies terraform and choudoufu kinds, and behold doctor --fix converts behold estates. But a team moving from Terraform Cloud, Spacelift or Backstage carries structure those tools hold outside the repo: TFC workspaces and projects, variables and run triggers; Spacelift stacks, their dependencies and policies; a Backstage catalog-info.yaml. Today that structure has to be re-entered by hand.
Once declared, a member's path up the ladder (other or terraform, then choudoufu, then chant) is also manual: choudoufu live-check, adoption, chant import, each run separately.
Proposal
chant workspace init --from tfc|spacelift|backstage: read the source (API token or exported file), propose members, links (stack dependencies, run triggers), environments and the records worth keeping (for example policy sets as constraint records), and show what was left out. Writes nothing without confirmation, like init today.
chant workspace promote <member>: move a member one rung, staged in a worktree and gated on the patch digest like upgrade. terraform to choudoufu runs live-check and adoption; choudoufu or other to chant runs import.
A Spacelift or TFC organisation with dependent stacks becomes a declared workspace with links, and one member is promoted from terraform to choudoufu by command.
Built and landed on integration/rulings-2 at 2400f34.
Done: chant workspace init --from tfc|spacelift|backstage (members, links, environments, constraint records, a left-out list; writes only on confirmation, plus chant-import.<source>.json) and chant workspace promote <member> (worktree-staged, gated on the patch digest under workspace-promote; terraform to choudoufu runs live-check and the live-import report, then stamps with -approve after approval; choudoufu or other to chant runs chant import). Unit tests use fixture JSON and an injected fetcher and runner, no network. Egress row and docs table added.
Left for the maintainer, so this stays open:
Real-API run against Terraform Cloud and Spacelift: not run, needs the maintainer. The Spacelift GraphQL query in import-fetch.ts is written from the schema docs and untested.
Real promote run (choudoufu live-check/live-import, chant import on a real estate): not run, needs the maintainer.
npm run generate:egress-catalogue refuses to run on the integration branch because lexicons/gcp/src/components/wait-gcp.ts and describe-stack-status.ts have no catalogue rows (not from this feature). I refreshed the docs block with the same render function; whoever adds the gcp rows should rerun the generator.
Open for the maintainer only. Everything buildable is built. What's left is a real Terraform Cloud or Spacelift API import (the Spacelift query has never run against an account) and a real workspace promote against a live estate.
Activity
lex00 commentedon Oct 24, 2026
Maintainer ruling (2026-10-23)
Accepted as proposed. This is build-ready.
feat(workspace): init --from tfc|spacelift|backstage and workspace pr…
feat(workspace): tests, docs and egress row for init --from and promo…
Merge 3178-init-promote: workspace init --from tfc|spacelift|backstag…
lex00 commentedon Oct 24, 2026
Built and landed on integration/rulings-2 at 2400f34.
Done:
chant workspace init --from tfc|spacelift|backstage(members, links, environments, constraint records, a left-out list; writes only on confirmation, pluschant-import.<source>.json) andchant workspace promote <member>(worktree-staged, gated on the patch digest underworkspace-promote; terraform to choudoufu runs live-check and the live-import report, then stamps with-approveafter approval; choudoufu or other to chant runschant import). Unit tests use fixture JSON and an injected fetcher and runner, no network. Egress row and docs table added.Left for the maintainer, so this stays open:
npm run generate:egress-cataloguerefuses to run on the integration branch because lexicons/gcp/src/components/wait-gcp.ts and describe-stack-status.ts have no catalogue rows (not from this feature). I refreshed the docs block with the same render function; whoever adds the gcp rows should rerun the generator.lex00 commentedon Oct 24, 2026
Open for the maintainer only. Everything buildable is built. What's left is a real Terraform Cloud or Spacelift API import (the Spacelift query has never run against an account) and a real
workspace promoteagainst a live estate.