-
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
feature: ability to disable the dependency lockfile #29760
Comments
Hi @aslafy-z, When you're working on a local build of a provider that hasn't been published to a registry, you should use development overrides. With a development override enabled, As noted over there, If you have further questions about this after you try it, please start a topic in the community forum where we can work through the specifics for your situation together if needed. Thanks! |
I still think this is a valid request, seems a lot of people are requesting the feature to disable the lockfile for many different reasons. Two on top of my head:
Reference to people having this sentiment can be found in:
Then there is also a lot of issues opened related to the terraform lock file and using different platforms. I won't link them here though, since that is somewhat of topic. But that could also be a reason why people would like to opt out. I was planning to create an issue for this for some time and was half way through, but unfortunately lost the content. If you think it would be valuable for me to create a new issue for this, I can do that again, or if we could re-use this issue, which at least has the correct title. Thanks! |
Hi @terlar, For the problem of read-only filesystems (and other related situations where we don't want to modify the filesystem, even if that were possible) we added a We are also aware of the challenges that arise when using the lock file with the optional global provider cache directory, which I assume is what you're referring to with regard to lock file on different platforms. There are documented workarounds for that, and we do intend to improve on it in a later release. That's currently represented by #27811. If you don't wish to use the lock file to persist selections between runs of Terraform then you can instead treat it as a per-working-directory artifact by putting it in your |
In my case (using Nix to manage the terraform/terraform plugins) and also creating a read-only directory with a set of terraform files it is not really possible to use Using Nix it has already been possible to verify all these things since the initial versions of terraform, so that is not of any concern. It validates the whole chain of dependencies and not just the plugins. I don't have experience with other tools, but reading comments there seems to be other tools built around terraform that have the same issues. So in my opinion best option would be to opt-out, second best to be able to specify another path for the lock-file, so you at least have an option to have it writeable (there is already a ticket for that) or the third best would be to pre-generate the lock-file. |
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. |
Current Terraform Version
Use-cases
I want to use a custom provider binary (locally built) when developing or fixing bugs on it.
Attempted Solutions
filesystem_mirror
to host a modified version of the provider: warn for invalid hashes in the lockfileterraform providers lock
: regenerates the lock file from the remote source (not local one)Proposal
Add a flag
-no-lockfile
that completly ignore the dependency lockfile.References
The text was updated successfully, but these errors were encountered: