-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: implement persistent terraform directories (experimental) #20563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
cbc9d5d to
e5c2b88
Compare
0c75392 to
a92dd47
Compare
7e07051 to
39f81f0
Compare
e5c2b88 to
87b5981
Compare
39f81f0 to
b2d70af
Compare
87b5981 to
27759a1
Compare
b39cb1f to
c21c9c9
Compare
4f4daa1 to
fb8dd3a
Compare
f95e7dc to
95f149a
Compare
5b3f9f8 to
5923703
Compare
27f40aa to
cc32f8e
Compare
cc32f8e to
41a4de5
Compare
2f45b69 to
86c520b
Compare
41a4de5 to
4b39bbb
Compare
3d4b0f3 to
0d0a43d
Compare
4005dbf to
fa93b50
Compare
0d0a43d to
88e70bb
Compare
fa93b50 to
17ad382
Compare
63b00e6 to
5a5ee0a
Compare
17ad382 to
388275e
Compare
5a5ee0a to
0a6762b
Compare
71a5ca9 to
a51ae86
Compare
0a6762b to
705a746
Compare
a51ae86 to
a6914e7
Compare
1b05f76 to
e469fd5
Compare
a6914e7 to
93aca5b
Compare
e469fd5 to
4096ad8
Compare
49464f4 to
52e2fa1
Compare
This was referenced Nov 12, 2025
52e2fa1 to
b0b5edb
Compare
dannykopping
approved these changes
Nov 13, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Screencast.From.2025-10-30.14-28-48.webm
Behavior change
Prior to this, every workspace build ran
terraform initin a fresh directory. This would mean themodulesare downloaded fresh. If the module is not pinned, subsequent workspace builds would have different modules.This change locks in a modules "version". If different provisioners warm their cache at different times, each provisioner could have a different truth for the module "version"
Implementation
tfpath.gois the implementation of where all terraform file management occurs. This PR makes the implementation an interface (unfortunate, will not use an interface when released).This moves almost the entire implementation into
tfpath/x/tfpath.go. All provisioned workspaces use the newxpackage when the experiment is enabled.Implementation details
terraform.tfstatefiles are written to a subdirectoryterraform.tfstate.d/<session>.terraformcli execs use the new terraform workspace contextTODO:
xpackage