Skip to main content

A wrapper for the Terraform CLI that provides a formatted plan summary.

Project description

terraformat

A wrapper for the Terraform CLI that provides a formatted plan summary.

Overview

terraformat is a command-line tool designed to improve the readability of terraform plan outputs. It runs your Terraform plan and summarizes the planned resource changes (create, update, destroy) in a color-coded, tabular format. This helps teams more quickly and safely review infrastructure changes before applying them.

Features

  • Runs any terraform command, but enhances terraform plan with a summary table
  • Color-coded output for quick identification of create (green), update (yellow), and destroy (red) actions
  • Parses complex Terraform resource addresses, including those in modules
  • Integrates seamlessly into existing Terraform workflows

Installation

pip install .
pip install git+https://github.com/henryupton/terraformat.git

Requirements

  • Python 3.7+
  • Terraform installed and available in your PATH

Python dependencies (installed automatically):

  • click
  • tabulate

Usage

After installation, you can use terraformat as a drop-in replacement for terraform. All commands are passed through to Terraform, but plan will be summarized:

terraformat plan [ARGS...]

Example output

🚀 Running 'terraform plan'...
--- Original Terraform Output ---
[standard terraform plan output here]

==================================================
📊 Terraformat Summary
==================================================
+----------------+---------+---------+----------+
| Resource Type  | Create  | Update  | Destroy  |
+================+=========+=========+==========+
| aws_instance   |   1     |   0     |    1     |
| local_file     |   1     |   0     |    0     |
| random_pet     |   0     |   1     |    0     |
+----------------+---------+---------+----------+
| Total          |   2     |   1     |    1     |
+----------------+---------+---------+----------+

If you run other Terraform commands, they’re just passed through unchanged:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terraformat-0.1.8.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terraformat-0.1.8-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file terraformat-0.1.8.tar.gz.

File metadata

  • Download URL: terraformat-0.1.8.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for terraformat-0.1.8.tar.gz
Algorithm Hash digest
SHA256 d508f15f482e23837ddee214aab757ebdb11bbdfae706b8be93e807b4682e8c5
MD5 579de7974e986a93ca70cbfd1c9e83fd
BLAKE2b-256 102c9bfd8b9ed97dd881f57d32517b7a2c83b401b44c29702830b75fb258ee82

See more details on using hashes here.

File details

Details for the file terraformat-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: terraformat-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for terraformat-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 eef34219df3214a6041380fda49ab6f7805cfc264a3036904c5ca6d637b90a25
MD5 e568d3e9a8d3112bcfc09ffec051b84f
BLAKE2b-256 8b42cbd8e869866a6af56c4e1c5adaa8d7ddc33bd5bad1d82fa88fdc4a46bfa0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page