Force Runs in a PR

Deployments in a Terraform and OpenTofu workflow can be highly dynamic with a high rate of change. With the force run setting, you can ensure the latest commit/run is always the one that has priority. As one of our customers stated, "the last write wins". If the force run feature is used, all pending runs that could potentially delay the latest run will be canceled and the run with the force flag will be bumped to the top of the queue. Active runs will never be canceled, only runs that are in a pending state.

In the case of a dry run, the force run option will only cancel the runs linked to the source branch.

The workspace attribute is force_latest_run. The default is false.

resource "scalr_workspace" "infra" {
  name           = "infra"
  environment_id = "org-123456"
  force_latest_run = "true"
}

See the full workspace provider docs here.