Skip to content

Let one repo deploy several components, each with its own state - #35

Merged
gsavage merged 1 commit into
mainfrom
add-component-name-input
Sep 29, 2026
Merged

gsavage merged 1 commit into
mainfrom
add-component-name-input

Conversation

@JonJagger

Copy link
Copy Markdown
Contributor

tf keyed the statefile, drift file, Kosli flow and drift
concurrency group on the repository name. A repo that deploys
several components (eg cyber-dojo/web: web, creator,
dashboard) had every component's terraform plan and apply
against the same state, terraform//main.tfstate.

component_name (plan, apply, detect-drift; default '') names
the component instead. base.yml exports it to bin/tf as
TF_COMPONENT_NAME, only when it is set, so tf.env can still
supply it. Empty, every value falls back to exactly what it
is today, so existing callers are unaffected:

  • statefile: the git remote's repo name
  • drift file: github_repository_name (apply) or the repo name
  • Kosli flow and concurrency group: the repo name

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com

  tf keyed the statefile, drift file, Kosli flow and drift
  concurrency group on the repository name. A repo that deploys
  several components (eg cyber-dojo/web: web, creator,
  dashboard) had every component's terraform plan and apply
  against the same state, terraform/<repo>/main.tfstate.

  component_name (plan, apply, detect-drift; default '') names
  the component instead. base.yml exports it to bin/tf as
  TF_COMPONENT_NAME, only when it is set, so tf.env can still
  supply it. Empty, every value falls back to exactly what it
  is today, so existing callers are unaffected:
  - statefile: the git remote's repo name
  - drift file: github_repository_name (apply) or the repo name
  - Kosli flow and concurrency group: the repo name

  Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@gsavage gsavage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @JonJagger

@gsavage
gsavage merged commit 2471f18 into main Sep 29, 2026
1 check passed
@gsavage
gsavage deleted the add-component-name-input branch September 29, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants