Terraform drift
Find out when real infrastructure no longer matches your Terraform code.
The agent runs terraform plan on your infrastructure code, on your own machine, and reports only which resources would change: their addresses, types and actions. State files, plan values and secrets never leave your machine.
Set up
- Install the terraform binary (or set STRATACORE_TERRAFORM_BIN to tofu) on the agent host.
- Set STRATACORE_TERRAFORM_DIRS to a comma-separated list of name=/absolute/path pairs, for example core=/srv/infra/core.
- The agent scans every hour. Change it with STRATACORE_TERRAFORM_INTERVAL_MIN, or press Scan now on the Drift page.
Results appear under Drift. A scan with changes is recorded in the audit log.
Applying a change
Applying is never automatic. An owner or admin approves a specific plan in the console, and the agent then applies exactly that saved plan. If the infrastructure changed since the scan the plan is refused and you scan again. The agent must also be started with STRATACORE_TERRAFORM_APPLY=1; without it, applying is disabled.
The plan is saved on the agent host in STRATACORE_TERRAFORM_PLAN_DIR. Protect it like your Terraform state, since a saved plan can contain sensitive values.