---
updatedAt: 2025-08-12T15:28:21.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# 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.

<Image align="center" src="https://files.readme.io/1dfab9a55306e845bdc069448bc119268eb2db01018312de5c684929d2b222c7-Screenshot_2024-10-10_at_11.06.45_AM.png" />

The workspace attribute is `force_latest_run`. The default is `false`.

```text main.tf
resource "scalr_workspace" "infra" {
  name           = "infra"
  environment_id = "org-123456"
  force_latest_run = "true"
}
```

See the full workspace provider docs [here](provider_resource_scalr_workspace).

# Sibling pages

* [Agent Pools](https://docs.scalr.io/scalr/docs/agent-pools-1.md)
* [Auto-Apply Runs](https://docs.scalr.io/scalr/docs/auto-apply-runs.md)
* [Auto Queue Runs](https://docs.scalr.io/scalr/docs/auto-queue-runs.md)
* [Container Image Info](https://docs.scalr.io/scalr/docs/container-image-info.md)
* [Custom Hooks](https://docs.scalr.io/scalr/docs/custom-hooks.md)
* [Deletion Protection](https://docs.scalr.io/scalr/docs/deletion-protection.md)
* [Ephemeral Workspaces](https://docs.scalr.io/scalr/docs/epehemeral-workspaces.md)
* [Execution Mode](https://docs.scalr.io/scalr/docs/execution-mode.md)
* [IAC Platform/Pipeline Settings](https://docs.scalr.io/scalr/docs/iac-platform.md)
* [Run Scheduler](https://docs.scalr.io/scalr/docs/drift-run-scheduler.md)
* [Run Timeout](https://docs.scalr.io/scalr/docs/run-timeout.md)
* [Run Triggers](https://docs.scalr.io/scalr/docs/run-triggers-1.md)
* [Sharing Outputs](https://docs.scalr.io/scalr/docs/sharing-outputs.md)
* [SSH Keys](https://docs.scalr.io/scalr/docs/ssh-keys.md)
* [Tags](https://docs.scalr.io/scalr/docs/tags-1.md)
* [.terraformignore](https://docs.scalr.io/scalr/docs/terraformignore.md)
* [Workspace Migration](https://docs.scalr.io/scalr/docs/workspace-migration.md)
* [Workspace Type](https://docs.scalr.io/scalr/docs/environment-types.md)