Highlights
Behavior change: estimate <plan.json> now prices the full post-apply fleet
Estimating from plan JSON previously counted only the resources a plan changed. It now walks planned_values and prices every resource that will exist after apply, so PROJECT TOTAL and the --format json payload reflect the whole projected infrastructure, not just the diff.
If you feed plan JSON into a --budget CI gate, the reported total will be higher than before and may change whether the gate passes. Use the new --show-delta flag for the previous change-only view.
New: c3x estimate --show-delta
A diff-style view from plan JSON with + / ~ / - markers, a DELTA line (creates and updates net of deletions), and a rolled-up summary of unchanged resources. Falls back to the standard renderer with a warning when there is no plan context (for example a plain .tf input).
New: optional(type, default) type-constraint defaults
Module variable optional() defaults are now resolved for both root and child modules, matching Terraform's runtime behavior, so catalog pricing expressions see real values instead of nil.
Fixes
- Guard the plan walk against a null
child_moduleselement and the type-constraint walk against a zero-argobject(), both of which could panic the parser on untrusted input. - Resources scheduled purely for deletion are excluded from
PROJECT TOTALand surface only in the--show-deltaview.
Changelog
- feat(plan): estimate the full post-apply fleet from plan JSON (#52)
- feat(estimate): plan delta view and optional() type defaults (#46)
Install
brew install c3xdev/tap/c3x
go install github.com/c3xdev/c3x/cmd/c3x@v0.2.0
docker pull ghcr.io/c3xdev/c3x:0.2.0