Skip to content

v0.2.0 — Terraform spend preflight

Latest

Choose a tag to compare

@jai-shopdevx jai-shopdevx released this 16 Aug 16:36
3e67d70

Spend preflight for Terraform — the point where breakerbox stops linting command strings and starts pricing the real diff.

terraform plan -out tfplan
terraform show -json tfplan > plan.json
breakerbox plan plan.json

breakerbox plan prices every created or replaced resource against the same catalog and 24h horizon the command engine uses, and applies the same caps — turning the unknownBlastRadius that terraform apply returns at the hook into a real number when you choose to run it.

  • Opt-in by design — deliberately NOT wired into the PreToolUse hook, so the hot path stays pure string-parsing with no subprocess and no Terraform dependency (~48ms preserved).
  • Coverage over precision — AWS/GCP/Azure compute, managed DBs, EKS/GKE/AKS node pools, NAT/ALB, and more; unrecognised resource types are reported as unpriced rather than guessed.
  • Same verdict surface — DENY/ASK against your action/session/daily caps, exit 2 on deny. Run it in CI before apply.
  • Also fixes breakerbox version (was hardcoded 0.1.0; now reads the package version, off the hook path).

78 tests · MIT · https://shopdevx.github.io/breakerbox/

From r/ClaudeAI feedback (u/kantorcodes1): terraform show -json + provider pricing is where it becomes real spend preflight instead of command linting.

🤖 Generated with Claude Code