Skip to content

workspace init from Terraform Cloud, Spacelift or Backstage, and workspace promote up the kind ladder #3178

Open

Description

@lex00

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.
  • Pairs with workspace exit (workspace exit: leave a member or workspace with one command, and an exit drill that proves it on every commit #3177) so onboarding and leaving are both one command each.

Done when

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.

Activity

  1. added
    enhancement
    area:workspace
    boundaries
    on Oct 1, 2026
  2. lex00 commented on Oct 24, 2026

    @lex00
    ContributorAuthor

    Maintainer ruling (2026-10-23)

    Accepted as proposed. This is build-ready.

  3. lex00 commented on Oct 24, 2026

    @lex00
    ContributorAuthor

    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.
  4. lex00 commented on Oct 24, 2026

    @lex00
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspaceboundariesenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions