-
Notifications
You must be signed in to change notification settings - Fork 9.8k
disable warning on init - Warning: Incomplete lock file information for providers #31856
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
Comments
Hi @oprudkyi! Thanks for sharing this feedback. Can you say a little about why you don't include the dependency lock file in your version control, which would then cause you to see this warning only the first time you add a new provider or explicitly upgrade it? I'm not meaning to suggest that it's wrong to not use the lock file, but our preference is to work towards addressing all of the shortcomings that are causing people to currently not use the lock file so that everyone will use the lock file, rather than constantly adding new workarounds for the people who aren't using it. That doesn't mean we cannot potentially do something more tactical like what you proposed here, but I would also like to add your situation to our set of feedback about the lock file behavior so that we can potentially make this situation moot for you in a later release. Thanks! |
We have some >400 root modules , basically this is some sort of self-service solution, where devs can manage infra/access without diving into complexity of tf - just by filling some abstract structures via PR (by example team/person has set of github reps and resources where it has access to, or standardized k8 clusters, where only few fields are needed to fill) , i.e. there is a set of many simple root modules - team, iam, application which managed by devs and set of modules which hides tf complexity inside, and managed by devops and there is a problem of maintaining lock files
|
Hello, It seems that the first time we do an upgrade of the providers we don’t get the warning, but if we do the upgrade in another workspace using the same provider we get the warning (since the providers aren’t downloaded again I guess [I’ve Regarding @oprudkyi’s first point, we’re also annoyed by the fact we cannot (or we haven’t found a way to) update providers without having state access and/or update a single provider. |
It should be possible to upgrade dependencies without accessing the state like this:
The extra With a working directory initialized in this way it's possible to run
Of course if you aren't using the lock file mechanism at all then this is all moot, but I'm sharing it just in case it's useful or interesting. |
the problem is not with backend, but with automation of lock files, there no point where I can integrate upgrading of lock files - users who create PR don't bother (and should not), PR by self is wrong place to update. The only option is avoiding them entirely. alternatively, it would be great to centrally control lock files (or have one global), i.e. we currently have similar solution for terraform version, there is .env.terraform_version with
and all triggers/actions use it, so devops can separately update version (and test it) without affecting other works, probably shared lock file would work too, but then it should somehow be merged/shared between many root modules (we can do it with softlinks), but different root modules use different set of providers - again we probably can use shared list of providers but I would prefer to hide warning, the problems I had with providers (broken github, google cloud) can be solved via required_providers and lock files there is less usable |
We also don't use the |
@apparentlymart I think I understand the problem you guys are trying to solve with these lock files, but I hope you realise that this change is going to break (or at least impair) a lot of peoples CI/CD processes. Here's our use case. We generate parts of our stacks on-demand every time we use them, to include various boilerplate and to work around some deficiencies in TF, we also prefer to always use the latest versions of providers and modules, only pinning when there are problems which cannot be resolved any other way. Maintaining these lock files would be annoying, expensive, and we don't want to lock versions anyway. If not maintaining these lock files will break the local caching (as noted in the 32205 ticket above) then they must effectively be considered a requirement, since the performance impact would be considerable in our environment, and the constant warning messages are annoying too. |
FYI, I just had this error when I put |
For our use case we don't include the dependency lock file in our version control because we version and bake the providers into a docker image that is then used by everyone else |
Same use case here. We use Terraform in a CI pipeline which runs
|
CI:
Simple. For no part of that is a lockfile relevant or helpful. If you use Terraform to resolve and download providers/modules from Hashicorp registry, it is useful. But for everyone else, it's simply noise. |
Rediscovered this ticket here. What the heck is Terraform expecting me to do!??!?!?! Compile my plugin for every operating system and platform, just to run it on my operating system and platform?!?!??!? To fulfill some philosophical itch??? Please explain why anyone, ever thought this ^ was a good idea. I want a glimpse into insanity ^ |
It would be nice to have some option to disable these warnings. |
Still seeing this issue in terraform v1.9.8. It's a useful warning if you are running terraform locally but not when you run |
Any intention on being able to hide this warning? |
Terraform Version
Use Cases
when lock file is unused really (recreated each time in ci/cd) there is always warning, which flood output with meaning-less info
Attempted Solutions
Proposal
Some option, like --ignore-lock-warning to disable warning entirely
References
No response
The text was updated successfully, but these errors were encountered: