-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
(stale) modules & providers remain installed after terraform init
#30005
Comments
After thinking through this and typing it all out 🦆 I'm realizing we could and should probably use the configuration as a primary source of truth in our use case and then use the internal state as secondary to provide the hierarchy, installed version, installed path etc. So it's no longer a blocker for us, but it is still somewhat surprising behaviour for me, so I'm going to leave this open in case you want to address it. I would expect this behaviour to potentially be problematic from disk usage perspective over the long run. btw. the same problem applies to provider installation. |
terraform get/init
terraform init
Terraform Version
Terraform Configuration Files
Expected Behavior
Previously installed removed module (
eks
in the example above) to be removed from the module manifest and filesystem (assuming it's downloaded from a remote location) upon removal from the configuration and runningget
orinit
.Actual Behavior
Entry for the removed module stays in the manifest and remains cached on the filesystem.
.terraform/modules/modules.json
Steps to Reproduce
terraform get
module "eks"
blockterraform get
Additional Context
We leverage the internal state (acknowledging it's not a stable/public API) in
.terraform/modules
to display details about installed modules in the Terraform VS Code extension and we noticed that we may often present stale data as a result of the above.The text was updated successfully, but these errors were encountered: