Skip to content
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

provide method (env var or flag) to restore old locking behavior #27888

Closed
wyardley opened this issue Feb 23, 2021 · 2 comments
Closed

provide method (env var or flag) to restore old locking behavior #27888

wyardley opened this issue Feb 23, 2021 · 2 comments
Labels
enhancement new new issue not yet triaged

Comments

@wyardley
Copy link

Current Terraform Version

Terraform v0.14.7

Use-cases

When directly pinning all versions already (as recommended by Hashicorp), and / or when using tools like Renovate to manage dependencies, the lockfile doesn't seem to add much, other than checking the hashes. While a user can ignore Hashicorp's suggestion to commit the lockfile, as we have, terraform will still create the lockfile locally, and complain if you try to run terraform init without --upgrade if the version changes. I get the reason behind creating the lockfiles, but IMO, it might have been nice to implement it a bit more slowly and / or with a bit more optionality.

While I suspect they (Renovate) will try, it's difficult for third party dependency managers to correctly and accurately keep lockfiles up to date for all tf lockfile versions that might exist in the future.

Having to explicitly run terraform init -upgrade to a version that's already explicitly requested (with ==) seems a bit excessive.

Attempted Solutions

using .gitignore to ignore lockfiles works to a point, but is still a hassle for local apply when versions get updated.

Proposal

Suggestions (this could be an either / or thing; happy to make a second feature request if it would help)
a) allow terraform init to automagically imply -upgrade when a version is explicitly requested
b) allow an env var or flag to ignore the lockfile completely and restore the old behavior of terraform init.

References

This comes out of some discussion in #27630
Renovate provider issue: renovatebot/renovate#7895

@wyardley wyardley added enhancement new new issue not yet triaged labels Feb 23, 2021
@wyardley
Copy link
Author

Closing now that #31533 has happened, and also now that there are some discussions happening.

@github-actions
Copy link

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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

1 participant