Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

tf-summarize

> 数据库
Open source

A command-line utility to print the summary of the terraform plan

723 stars0 likes2 views
WebsiteGitHub

About

A command-line utility to print the summary of the terraform plan

tf-summarize (Terraform Summarizer)

tf-summarize is a command-line utility to print the summary of the terraform plan

  • tf-summarize (Terraform Summarizer)
    • Demo
    • Why do we need it ?
    • Install
      • Using Go
      • Using Brew
      • Using asdf
      • Using Docker
      • Using Github action
      • Download zip in release page
      • Clone and Build Binary
    • Usage
    • Examples
      • GitHub Actions Workflow
        • Using setup-tf-summarize action
        • Other approach
      • Codefresh example
      • Comment terraform plan summary in PRs
      • Interactive summary review
    • Screenshot
    • TODO

Demo

If demo is slower for you, please see examples and screenshot for more details

Why do we need it ?

  • Most of the time, we make changes to the terraform files or tf-var files and run the plan command. And we precisely know which resources will get affected. In those time, we would like to just see the resource name and it's change.
  • When our plan have more than say 10 changes, we will first see what are the deleted changes, or we will just see the list of resources that get affected.

Install

Using Go

bash
go install github.com/dineshba/tf-summarize@latest

Using Brew

bash
brew install tf-summarize

Using asdf

bash
asdf plugin add tf-summarize
asdf install tf-summarize latest

See the asdf plugin source for more information.

Using Docker

bash
docker run -v $PWD:/workspace -w /workspace ghcr.io/dineshba/tf-summarize -v # prints version
docker run -v $PWD:/workspace -w /workspace ghcr.io/dineshba/tf-summarize tfplan.json
docker run -v $PWD:/workspace -w /workspace ghcr.io/dineshba/tf-summarize -tree tfplan.json
# see example section for more examples

# add alias if needed
alias tf-summarize="docker run -v $PWD:/workspace -w /workspace ghcr.io/dineshba/tf-summarize"
tf-summarize tfplan.json
# see example section for more examples

tf-summarize will accept tfplan directly. Docker based tf-summarize is not having terraform-binary to convert tfplan to json. So it only works with json files. If you want to use with tfplan directly, You can build a base image with terraform (use same version as tfplan created) and have our binary in it.

Using Github action

The below example uses kishaningithub/setup-tf-summarize

yaml
steps:
- uses: kishaningithub/setup-tf-summarize@v1

For more customization options, kindly refer to the documentation here

Download zip in release page

  1. Go to release page https://github.com/dineshba/terraform-plan-summary/releases
  2. Download the zip for your OS and unzip it
  3. Copy it to local bin using cp tf-summarize /usr/local/bin/tf-summarize or to location which is part of $PATH
  4. (For Mac Only) Give access to run if prompted. Refer here

Clone and Build Binary

  1. Clone this repo
  2. Build binary using make build or go build -o tf-summarize .
  3. Install it to local bin using make install or cp tf-summarize /usr/local/bin/tf-summarize

Usage

…

Examples

…

GitHub Actions Workflow

Using setup-tf-summarize action

The below example uses kishaningithub/setup-tf-summarize

yaml
name: Run tf-summarize

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: kishaningithub/setup-tf-summarize@v1

      - name: Print tf-summarize version and help
        run: |
          tf-summarize -v
          tf-summarize -h

For more customization options, kindly refer to the documentation here

Other approach

Please refer this sample GitHub actions file and the sample runs here

Note: If you are using hashicorp/setup-terraform GitHub action to set up terraform, ensure terraform_wrapper is set to false.

Codefresh example

The below assumes that you have a stage called show in your codefresh.yaml example

We need to output the plan to json as there were some strange issues on codefresh when we used the tfplan file

A full example is available at example/codefresh/codefresh.yaml

yaml
  TerraformPlan:
    title: Terraform Plan
    image: hashicorp/terraform:light
    stage: plan
    working_directory: "${{clone}}"
    commands:
      - terraform plan -out=tfplan
      - terraform show -json tfplan > output.json
  
  tfSummarize:
    title: Show Changes
    image: ghcr.io/dineshba/tf-summarize
    stage: show
    working_directory: "${{clone}}"
    commands:
      - tf-summarize output.json

:warning: Not maintained by dineshba : The above example is maintained by userbradley - Any questions related please tag @userbradley on an issue

Comment terraform plan summary in PRs

Refer this example to add comments in your PR. Sample comment added by github actions bot.

Interactive summary review

You can use tool fx to review the summary fo the terraform change

bash
tf-summarize -json tfplan | fx

Screenshot

TODO

  • Read terraform state file directly. (Currently need to convert to json and pass it)
  • Directly run the terraform plan and show the summary
  • Able to show summary of the current terraform state
  • Include version subcommand in binary

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gohacktoberfestsummaryterraform

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库