Skip to main content

Breaking Change: TF_VAR_spacelift_run_trigger now reported correctly for Pull Request events

We have made a change that may affect you. Tracked runs that are created when a pull request is merged now record the commit as their trigger. Runs from Push events already behaved this way. Before this change was made, these tracked runs had no recorded trigger, so TF_VAR_spacelift_run_trigger fell back to git. It now reports vcs/commit.
The purpose of this change is to fix downstream stacks in a dependency chain, skipping their run when the upstream stack had no output changes.

Who’s affected: You will only be affected if your hooks or Terraform/OpenTofu code check the TF_VAR_spacelift_run_trigger variable for git. You will need to make sure they are updated to accept vcs/commit as well.

Here is an example:

contains(["git", "vcs/commit"], var.spacelift_run_trigger)

As it did before this change, git remains the fallback for runs with no recorded trigger, such as Proposed Runs.
For more information on all the possible values, check out the Spacelift environment documentation. And, as always, let us know if you have any questions, or feedback!