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.3.tar.gz (7.4 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.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terraformat-0.1.3.tar.gz
  • Upload date:
  • Size: 7.4 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.3.tar.gz
Algorithm Hash digest
SHA256 b18430e3d138e2fa964c6892c90f9ce3343c9ac9498a280abf0059ac5887f42c
MD5 0a7746de1fd8ed33038d1d9990b69578
BLAKE2b-256 99905abb4817a1c1618db433a1f54e206d7606c020539c12ffdcaaea47da837d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: terraformat-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba7c23038d7a4ddb3b07f0bdef302fe4ed6f89acb5d045cba9d77f60a73446b0
MD5 cf3b991777c04ffb2769cac88ceee429
BLAKE2b-256 03b95f482986e5f3c1e5657e0bba625ec17229ec631c96e6af40b71bff878311

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