Terraform plan risk explainer — reads `terraform plan` JSON and classifies each change as safe/review/dangerous/irreversible.
Project description
readtheplan
Read the plan. Every time. For real.
readtheplan is a Terraform plan risk explainer. It reads terraform plan output, classifies each change as safe / review / dangerous / irreversible based on the action × resource type × what compliance context it touches, and posts a markdown summary your release manager (or auditor, or AI agent) can read in 30 seconds.
status
🧪 Alpha — v0.0.2. First working release on PyPI. The MVP-1 CLI ships an action-based risk classifier (per ADR 0003) and the MVP-4 composite GitHub Action wraps it. Resource-aware rule library (MVP-2) is next.
why this exists
Terraform's plan/apply separation exists so a human reviews changes before they hit prod. In practice:
- the diff in code ≠ the diff in plan (renames show as destroy+create, provider bumps mutate untouched resources,
apply_immediatelyflips have hidden timing implications) - AI agents now write Terraform PRs — most don't read the plan critically, they apply because "the test passed"
- compliance reviewers (FinServ, healthcare, government) need a structured risk classification, not a 4,000-line text blob
- existing tools either show prettier plans (Spacelift, env0) or scan code for policy violations (tflint, tfsec, checkov). Nobody opinionates the plan diff with blast-radius context.
philosophy
Anchored in this field note: terraform-apply-is-roulette. If you've ever shipped a panic on terraform validate or watched a forward-fix cascade into a longer outage, this tool is built for you.
planned MVP scope
- CLI:
readtheplan analyze plan.json→ markdown table of changes with risk levels - plain-english explainer per resource type (top ~30 high-risk patterns covered out of the box: KMS, IAM, RDS replacements, S3 bucket destroys, EKS node-group replacements, route53 zone deletes, network ACL strips)
- AI-agent attestation header — flag whether an agent claims to have read the plan
- GitHub Action wrapper: install as
uses: readtheplan/action@v1, posts a markdown PR comment - YAML rule customization: define org-specific rules ("anything in account 1234 is
review")
what's not in scope (and won't be)
- multi-cloud beyond AWS (initial focus)
- a SaaS dashboard (defer until revenue justifies)
- a policy-as-code engine (OPA / Sentinel already exist)
- competing with Spacelift / env0 / Snyk IaC on overlapping features
license
MIT — see LICENSE.
CLI JSON output
MVP-1 exposes a stable machine-readable contract for automation:
readtheplan analyze --format json plan.json
The JSON object includes:
resource_change_count: total Terraformresource_changesentries.actions: counts keyed by Terraform action set, such ascreateordelete/create.risks: counts keyed by readtheplan risk tier.changes: one object per resource change withaddress,type,actions, andrisk.
Invalid input is reported on stderr and exits non-zero.
GitHub Action
This repository includes a composite GitHub Action at the repo root. It installs the local Python package from the action checkout by default, runs the JSON CLI contract, and exposes the parsed values as outputs.
- name: Analyze Terraform plan
id: readtheplan
uses: readtheplan/readtheplan@v1
with:
plan-file: plan.json
fail-on-changes: "false"
- name: Use readtheplan output
run: |
echo "${{ steps.readtheplan.outputs['summary-json'] }}"
echo "${{ steps.readtheplan.outputs['resource-change-count'] }}"
Action outputs:
summary-json: full JSON emitted byreadtheplan analyze --format json.resource-change-count: total resource changes.action-counts: compact JSON object of action counts.risk-counts: compact JSON object of risk c
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file readtheplan-0.0.2.tar.gz.
File metadata
- Download URL: readtheplan-0.0.2.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f99a3fdab69e996bec058d41c44c54cfc17d0216ca8ed080e7e1d0011d01dea4
|
|
| MD5 |
8bc64e1b44c863d34a974a1fae022a0f
|
|
| BLAKE2b-256 |
6a7610b19332b43e0bbfe805681fba4307e5f2b872ecbed1e02abfc3c7ae2454
|
File details
Details for the file readtheplan-0.0.2-py3-none-any.whl.
File metadata
- Download URL: readtheplan-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c60bc160ee0b1aa292cfb6a0160e4ab5f2137d83bb6003799da28646ef69664
|
|
| MD5 |
a803594baf114b755892680c9aca5f0c
|
|
| BLAKE2b-256 |
009adb39d0a700732c9b704fed36d6ff93137835fa988bf6f2c79ffc8759ce50
|