The alert fired at midnight. Something in the stack had shifted, but no one had touched the code.
That’s infrastructure as code (IaC) drift. It happens when the live environment moves away from what’s in version control. A manual change. An untracked script. An automated job gone rogue. The longer it goes unnoticed, the harder it is to fix.
IaC drift detection solves this by watching for changes that happen outside your provisioning pipeline. It protects reliability, security, and predictability. In practice, drift detection scans your deployed resources against your IaC templates—Terraform, CloudFormation, Pulumi, or similar—and flags mismatches.
When you run drift detection inside a live terminal session, you want instant feedback, easy navigation, and zero context switching. That’s where tmux becomes critical. With tmux, you can keep a persistent session that runs your drift detection job in one pane, logs in another, and an editor or REPL in a third. When the detection process flags drift, you can jump directly to investigating without losing state.
A tight IaC drift detection + tmux workflow looks like this:
- Use a detection tool or pipeline that can run continuously or on a schedule.
- Start
tmux before running the detection job. - Split panes for parallel monitoring: one for drift detection output, one for version history, and one for applying fixes.
- Keep the session alive across SSH connections, so drift findings are ready the moment you log back in.
Reliable drift detection reduces firefighting. Coupling it with tmux makes your investigation process faster because you never lose your workspace. You can patch drift in minutes instead of hours.
If your goal is to see IaC drift before it breaks production, and prove the fix, you need to measure it in real time. hoop.dev makes this easy. Spin up drift detection in tmux and watch it live in minutes—see how at hoop.dev.