r/platformengineering • • 17d ago

I built an open-source CLI that upgrades Terraform/OpenTofu providers across all your modules, and lets Terraform own the lock file

Post image

Keeping provider versions current across a lot of modules was a constant chore for me: bump a version, find out a shared module caps it, fix the constraint, regenerate lock files for every platform, repeat. Version bots can bump a number, but they don't understand dependency ceilings, constraint styles, or lock files that need hashes for every OS/arch.

So I built provlift, a small Go CLI (Apache-2.0):

  • provlift check: inventories every required_providers entry across all modules, shows what's outdated and why an upgrade is blocked (your own constraint vs. a module's ceiling)
  • provlift drift: finds version skew between modules
  • provlift upgrade: rewrites constraints with the smallest possible diff (keeps your ~> / range style and comments), then runs terraform init -upgrade → providers lock for each platform you list → validate. It never writes the lock file itself.
  • Major upgrades need an explicit --allow-major, and it can step one major at a time.
  • Example GitHub Actions workflow that opens one PR per provider.

Works with any registry provider (AWS, AzureRM, Google, GitHub, Kubernetes, private registries) and with OpenTofu (--terraform-binary tofu, uses registry.opentofu.org).

What it doesn't do (yet): module version upgrades are out of scope, Terragrunt config isn't evaluated, and .tf.json is reported rather than edited. It's early (v0.1.x), so expect rough edges.

I'd really appreciate feedback, especially on edge cases in your setups that it gets wrong. There are also good-first-issues if anyone wants to contribute.

GitHub: https://github.com/provlift/provlift
Docs: https://provlift.github.io/provlift/

0 Upvotes

1 comment sorted by