Skip to main content

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
Status: ❌ Rejected2 comments

Log in to comment and vote

Comments2

  • Jonah Kowall

    Team•

    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

    Hi Julio! Thanks for the suggestion. To better understand the problem you're solving - what's driving you to upgrade terraform locks? Is it: - Security patches you need to apply? - New provider features you want to use? - General maintenance to stay current? - Something else? Understanding the "why" behind the upgrades will help us think about the best way to support this workflow.