Skip to content

docs: Module Cache page (TF_DATA_DIR) for workspaces - #47

Draft
TigranKhudav wants to merge 2 commits into
terrakube-io:mainfrom
TigranKhudav:docs/module-cache
Draft

docs: Module Cache page (TF_DATA_DIR) for workspaces#47
TigranKhudav wants to merge 2 commits into
terrakube-io:mainfrom
TigranKhudav:docs/module-cache

Conversation

@TigranKhudav

Copy link
Copy Markdown

Summary

New page Workspaces → Module Cache explaining why every job re-downloads modules and providers (throw-away clone) and the three ways to keep them between jobs of the same workspace:

  1. helm chart executor.cache block (feat(executor): executor.cache block for provider + module caching (chart 4.8.0) terrakube-helm-chart#293),
  2. the executor's TerraformDataDirCacheRoot setting (feat(executor): per-workspace terraform data directory cache (TF_DATA_DIR) terrakube#3478),
  3. a plain TF_DATA_DIR workspace environment variable, which works with any version.

Includes the caveats (pinned versions since init runs without -upgrade, lock file vs. TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE, RWX volumes for several replicas, how to reset a workspace's cache) and a cross-link from the existing Provider Cache page.

🤖 Generated with Claude Code

Documents how to keep downloaded modules and providers between jobs of
the same workspace: the helm chart executor.cache block, the executor's
TerraformDataDirCacheRoot setting, and the plain TF_DATA_DIR workspace
environment variable that works with any version. Cross-links the
provider cache page.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TigranKhudav

Copy link
Copy Markdown
Author

Follow-up: added the note that TF_PLUGIN_CACHE_DIR must already exist (Terraform does not create it) and that the chart's executor.cache init container takes care of it.

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.

1 participant