Auto push of terraform.lock files
When in need of upgrading the terraform locks, we currently need to do manual download and push to the repo.
I think that it’d be a huge improvement if spacelift adds the feature to upgrade and push these files directly to github (or any other system).
- Workaround
- Problem
Log in to comment and vote
Comments2
Jonah Kowall
Jul 12
Thanks for the request. Spacelift honors a committed .terraform.lock.hcl: https://docs.spacelift.io/vendors/terraform/dependency-lock-file. Having Spacelift push generated files back to your repo runs against code-as-source-of-truth, so it’s not something we plan to build; if you want this behavior, a before_init hook with your own VCS credentials can commit lock files through a PR under your control. Closing on that basis.
Black Breeze
May 27, 2025