minamijoyo / tfupdate

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

`tfupdate lock` doesn't work with non specific constraints #95

Open philnielsen opened 1 year ago

philnielsen commented 1 year ago

Thanks for making an awesome tool! found an issue with the latest 0.7.1 tfupdate lock command (which is an awesome addition, definitely will use this!).

Not Working (for updating the lock files, provider changes work): tfupdate provider aws test -r -v "~> 4.0" tfupdate lock --platform=linux_amd64 --platform=darwin_amd64 --platform=darwin_arm64 -r test Behavior: tfupdate just exits immediately. (i've tried with several types of version constraints, anything that isn't -v "5.6.2" or latest doesn't work)

Working: tfupdate provider aws test -r tfupdate lock --platform=linux_amd64 --platform=darwin_amd64 --platform=darwin_arm64 -r test Behavior: lockfile is updated as expected.

minamijoyo commented 1 year ago

Hi @philnielsen, Thank you for opening this issue!

The version constraint expression has yet to be supported due to the current compromise to minimize the scope of implementation that I need for now. However, still, it's possible if we fetch a list of all available versions and cache it in memory. I'll treat this issue as a feature request. Thanks!

philnielsen commented 1 year ago

ah that makes complete sense, thanks for the context! I completely missed this section in the README Note that version constraint expressions or indirect dependencies via modules are not supported and ignored. on the first pass.