Skip to content
tiv
GitHub

tiv summary

A one-screen overview of a Terraform project in the terminal: what is deployed, what a plan would change, and what the configuration declares. No browser involved.

Terminal window
tiv summary

Example output:

State
Source: backend (s3)
Location: s3://my-team-states/shop/terraform.tfstate
Terraform: 1.9.8
Resources: 19, 3 data sources
Modules: module.notifications, module.ordering, module.storefront
Plan
not requested — use --plan to generate one, or --plan-file <path> to include a saved plan
Configuration (HCL)
Path: /Users/you/shop/infra
Terraform: required >= 1.5
Resources: 19, 3 data sources
Providers: aws (hashicorp/aws ~> 5.0)
Modules: 3 called — notifications, ordering, storefront
Variables: 6 (2 required)

Each section names where its data came from, and says so plainly when a source is unavailable.

State resolves like the other commands: --state flag, then state.json or terraform.tfstate in the current directory, then the backend via terraform show. When state comes from a backend, the summary names the backend type and where the state lives (s3://bucket/key, a Terraform Cloud workspace, a local path). Sensitive backend settings are redacted. For local files the last-updated time is shown.

Plan is strictly opt-in, because generating a plan takes time and touches providers:

Terminal window
tiv summary --plan # run terraform plan and include the changes
tiv summary --plan-file plan.json # include a saved plan JSON file instead

With a plan included you get change counts: 2 to add, 5 to change, 0 to destroy, 1 to replace, 1 to read (16 unchanged). Data source reads are counted separately from unchanged resources, since a read is something Terraform will do.

Configuration (HCL) scans the .tf files in the current directory: resource counts, required terraform version, provider requirements with version constraints, module calls, and variable counts.

--json prints everything the summary collected, including per-resource detail the text view leaves out:

Terminal window
tiv summary --json -q | jq '.state.resources'
tiv summary --json -q | jq '.plan.by_action'
Flag Default What it does
--state none Path to state JSON or a raw .tfstate file
--plan-file none Path to a plan JSON file to include
--plan false Run terraform plan and include its changes
--json false Output everything as JSON