Understand a Terraform or OpenTofu plan before you apply it.
terraform plan tells you what will change. interragate tells you what that means: which changes destroy data, which only happen because something else changed, what was changed by hand and is about to be undone, and where the apply will fail. It runs locally on the terraform or tofu you already use, with no account, and nothing leaves your machine.
Early release: analysis is heuristic, with the most detailed rules for AWS. Review the underlying plan before applying. Report a bug or contribute.
go install github.com/Jeecabs/interragate/cmd/interragate@latest
interragate demo # a sample plan: no Terraform or cloud account neededThen, in a Terraform or OpenTofu directory:
interragate # plan and explain
interragate --open # ...and open the interactive report
interragate watch # a live report that plans again every time you save
interragate apply # apply exactly the plan you just read, once you confirmAlready have a plan? interragate show tfplan explains a plan file or plan JSON. Every command, other ways to install and tab completion: docs/commands.md.
- Why each resource changes, with Terraform's reasons spelled out.
- What a change follows from: values are traced through references, modules and locals, so twenty ripples read as one cause.
- What it costs: data destroyed, the window a replaced resource is gone, access opened ("+ Inbound TCP 22 (SSH) from
0.0.0.0/0"). - What only looks like a change: tag-only updates, null-versus-empty flips and reformatted JSON are folded away.
More, with drift, deploys and readable diffs: docs/analysis.md.
In a git repository, interragate ties each change to the edit behind it, and points out what no edit explains: drift, someone else's change, a provider upgrade. That is what a reviewer most needs to see.
interragate walks the changes in the order Terraform's apply will, with typical times for slow resources. It says how long the apply takes, where it is expected to fail, and what that leaves half done.
Terraform's dependency graph does not capture every relationship between your systems. Some dependencies exist only as tribal knowledge within your team. Declare them in .interragate.yaml so interragate can account for them when reviewing a plan.
interragate flags when a plan removes something a dependent system needs, changes a value it uses, blocks its access or causes an outage during apply. It also accounts for how each system picks up changed values. How to declare dependencies.
Fifty-four plan-aware rules flag what this change introduces. Some catch what no linter can see, because it only exists in the plan:
| Rule | What it catches |
|---|---|
protected-delete |
Replacing a database while deletion protection is still on, so the apply fails halfway. |
replace-in-use |
Deleting a security group, target group or certificate first while resources the plan keeps still use it. |
count-index-shift |
Removing an item from the middle of a count list, which shifts every later instance. interragate writes the moved blocks. |
missing-moved-block |
A destroy plus a create with the same settings: a rename without a moved block. |
untied-destroy |
A destroy or replacement that no edit on your branch explains. |
drift-revert |
The plan undoes a hand-made change, such as an emergency firewall rule. |
Every rule: docs/rules.md. Your team's own rules, in YAML: docs/configuration.md.
interragate --open writes the plan as one self-contained HTML page: an overview, a dependency map, the apply's timeline, readable diffs and a review checklist. It makes no network requests. Reports can still contain infrastructure details and unmarked secrets; review them before sharing or attaching them to a CI run. See SECURITY.md.
Every view: docs/report.md.
- uses: Jeecabs/interragate@main
with:
plan: tfplan
working-directory: infra
comment: true # one pull request comment, kept up to dateinterragate check exits 2 when a finding reaches --fail-on, and writes Markdown, SARIF, GitHub annotations, JSON or a Mermaid diagram. GitLab, Atlantis and the action's inputs: docs/ci.md.
interragate comes with an Agent Skill that teaches coding agents to review plans with it: what to run, what to look for, and not to apply unless you ask.
/plugin install interragate --marketplace Jeecabs/interragate # Claude Code
codex plugin marketplace add Jeecabs/interragate # Codex, then:
codex plugin add interragate@interragate
copilot plugin marketplace add Jeecabs/interragate # Copilot CLI, then:
copilot plugin install interragate@interragate
npx skills add Jeecabs/interragate # Cursor and other agents
interragate reads terraform show -json and, when the configuration is next to the plan, its .tf files and git. The analysis is deterministic, with no model in the loop, so the same plan always produces the same report. How it compares with other tools: docs/landscape.md.
- Commands: every command, installing and tab completion
- What interragate tells you: causes, your branch, owners, drift, access and scanners
- The report: every view of the HTML report
- Rules and configuration, with your own policies
- CI and the JSON report
- Development: building, fixtures, the website and the agent plugin
See CONTRIBUTING.md for development and pull requests, and SECURITY.md for private vulnerability reports.
interragate is licensed under AGPL-3.0-only, with copyright and licence notices retained and source-sharing requirements for covered derivatives. Contributions use the same licence, without copyright assignment. See LICENSING.md and the third-party notices.