minamijoyo / tfupdate

Update version constraints in your Terraform configurations
MIT License
539 stars 23 forks source link

tfupdate lock doesn't work without required_providers #107

Open olfway opened 7 months ago

olfway commented 7 months ago

We currently not using required_providers in our root modules and it seems tfupdate not supporting this

Maybe tfupdate lock could read providers and their versions from .terraform.lock.hcl itself?

This way we can use terraform init to upgrade providers and then tfupdate lock to update lock file with hashes

brandon-fryslie commented 7 months ago

I think the question would be why aren't you using required_providers? Every root module should define the providers and versions it requires.

olfway commented 7 months ago

Terraform doesn't complains without it, versions of providers pinned in .terraform.lock.hcl So I'm not sure why would I need it