Drift Detector
Drift detection runs do NOT count toward billing.
Overview
Drift detection in Terraform or OpenTofu is a feature that helps identify when your actual infrastructure state has deviated ("drifted") from the desired state defined in your Terraform/OpenTofu configuration.
In Scalr, drift detection can be enabled per environment. If enabled in an environment, all workspaces in the environment will have the detection schedule applied.
To enable it, go to the environment management settings, click on drift detection, and apply the schedule:

Once enabled, the drift detector will execute based on the schedule. If drift is detected, workspace owners will see the drifted run in the drift detection tab. Drift detection runs do not block the run queue if drift is found and waiting on your decision (Sync state or revert infrastructure).

Drift will execute if the workspace has the following:
- The workspace has active state.
- A workspace has not been applied during the configured period: daily - in the last 24 hours, weekly - in the last 7 days.
- Remote execution is mode enabled.
Drift Actions
When reviewing drift within a workspace, a user will have three options:
- Ignore: Changes found by the drift detector are declined, and no further actions are performed. Users can choose to resolve the drift manually.
- Sync State: Changes found by the drift detector will be written to a state file. After clicking "Sync State", a
refresh-only
run will be triggered to synchronize the state. Theruns:create
permission is required. - Revert Infrastructure: Changes found by the drift detector will be declined. After clicking "Revert Infra", a
plan & apply
run will be triggered to rollback infrastructure to the previous state. Theruns:create
permission is required.
Runs executed to sync state or revert infrastructure will count towards billing.

Updated about 22 hours ago