DEVOPS

Scheduled Terraform Drift Scan with Owner-Routed Slack Alerts

Runs a scheduled terraform plan against your infrastructure, detects any resources that drifted from the committed state.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSchedule fires (nightly/hourly)
  • ActionRun terraform plan -detailed-exitcodeShell
  • LogicBranch on exit code: 2 = drift, 0 = clean
  • ActionParse drifted resources and owner tagsShell
  • LogicMap owner tag to Slack target
  • OutputPost per-owner drift diff to SlackSlack

What it does

On a fixed schedule it executes `terraform plan` in detect-only mode across your live infrastructure, parses the plan for any resource that no longer matches committed state, and notifies the owning team in Slack with a per-resource diff. Clean plans pass silently so the channel only sees real drift.

When to use it

Use it when console hotfixes, auto-scaling, or third-party automation quietly mutate cloud resources and your committed Terraform falls out of sync. A nightly or hourly sweep surfaces drift before the next apply clobbers or restores it unexpectedly.

How it works

  1. 1A scheduled trigger fires at your chosen cadence (e.g. nightly).
  2. 2A shell action runs `terraform plan -detailed-exitcode -no-color` and captures the output and exit code.
  3. 3A logic step checks the exit code: code 2 means drift detected, code 0 means clean and the run ends.
  4. 4An action parses the plan into a list of changed resources, each tagged with its module owner.
  5. 5A logic step maps each owner tag to a Slack channel or user handle.
  6. 6An output step posts a threaded Slack message per owner with the resource address, attribute diff, and a link to the plan log.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect ShellRun sandboxed commands inside the workspace.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.