-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Caching not usable in 0.14.x due to lock file checksums #27769
Comments
+1, we're having to write a post-plan/apply script to delete the lockfiles |
Hi all, thanks for reporting this issue. This is the (very simple) configuration I've tried;
I tried changing the provider version without re-running |
@mildwonkey In our case, this exact issue happens when we create the lockfile (with caching enabled) in a MacOS environment, then run a plan/apply a CI environment running Linux - just like #27135. Sadly we still have to find a practical solution (right now our workaround is to run I think that #27811 provides a thorough analysis and references different tickets with nuances of the same underlying problem. |
Ahh, thank you for that. 🤔 since what you are describing is the current documented workflow, do you think we can close this ticket in favor of that enhancement request? It doesn't sound like there is a bug to me, but I don't want to close this if you disagree with my assessment! |
I agree that it's better to have a single point of discussion. I'd just wait for a confirmation that @milosbackonja and/or @alex-derzhi-sp are stuck in the same scenario :) |
@mildwonkey Did you try to use it multiple times in configuration? If you call same module in several places using cashed providers it will fail. If you use it only once reference, and hash will be ok I guess... |
FYI @tombuildsstuff I'm experiencing this issue in a strange way in Azure Cloud Shell, which is a container based CLI hooked up to the Azure Portal. After running terraform init a few different times for different configurations in different directories, I start getting 'Error: Could not load plugin'. I've tried everything to try to "reset" the environment including deleting ~/.terraform.d but still haven't figured out how to reset things to get them working again. |
@tombuildsstuff FYI I think this is related: https://stackoverflow.com/questions/65882461/terraform-error-could-not-load-plugin |
@mildwonkey I can repro this consistently on Azure cloud shell using this repo: https://github.com/doherty100/azurequickstarts If you just apply each of these quick starts in the order described, you will eventually get this error on Azure Cloud Shell. |
I have not ben able to reproduce this in current terraform releases, using a shared cached for multiple provider versions and architectures from multiple root modules. We can track the future enhancements in the linked issue, so I'm going to close this for now. If someone encounters the same issue with a current release and can supply a standalone reproduction case, feel free to file a new issue. Thanks! |
I've been running into this in my environment as well. We use a docker image that includes a bunch of providers pre-installed via the
I'm not sure what could be causing it to mis-calculate the checksum... but this is the crux of the problem. Something must not be safe with simultaneous access to the cache directory. I wasn't sure if I should open a new ticket or just update this one, but I wanted everyone watching this to see what I found, so I opted for the latter. We can fork this if that makes sense... Oh, and I run into this with |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Plugin caching is unusable since it fails when verifies checksum in dependency lock file.
Is there way to disable this locking feature? Tbh I can see that caching feature is more needed than this sufficient locking feature.
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform init
terraform apply/validate/plan
Additional Context
References
The text was updated successfully, but these errors were encountered: