Skip to main content

Beautiful Terraform Plan Reports

Project description

tofUI 🎨

Install Release License: MIT

Beautiful, interactive HTML reports from OpenTofu & Terraform plans.

👉 Live example report · more in examples.md

Install

brew tap 65156/tofui
brew install tofui

Homebrew 6.0+ requires trusting third-party taps. If you see Refusing to load formula … from untrusted tap, run brew trust 65156/tofui and re-run the install.

Other install methods
# Homebrew, without tapping first
brew install 65156/tofui/tofui

# pip (from PyPI) — generating reports needs no dependencies at all
pip install tofui

# pip (latest from GitHub)
pip install git+https://github.com/65156/tofUI.git

Publishing backends are opt-in, so a plain install stays dependency-free. Add only what you use:

Extra Installs Needed for
tofui[s3] boto3 --s3-bucket
tofui[gcs] google-cloud-storage --gcs-bucket
tofui[ghpages] requests --github-repo
tofui[dashboard] requests --dashboard-repo
pip install 'tofui[gcs]'          # one backend
pip install 'tofui[s3,ghpages]'   # or combine

Usage

1. Produce a plan JSON with OpenTofu or Terraform:

# OpenTofu
tofu plan -out=plan.tfplan
tofu show -json plan.tfplan > plan.json

# Terraform
terraform plan -out=plan.tfplan
terraform show -json plan.tfplan > plan.json

2. Generate the report (--build-name sets the output filename):

tofui plan.json --build-name my-plan

3. Open it:

open my-plan.html

That's the whole workflow. For S3/GCS/GitHub Pages uploads, dashboard publishing, CI/CD, and configuration, see examples.md.

Hosting reports on a private bucket

Upload to a private S3 or GCS bucket and get a signed link to share on a PR — no public hosting required:

# GCS (requires: pip install 'tofui[gcs]')
tofui plan.json --build-name "pr-42-$GITHUB_SHA" \
  --gcs-bucket my-project-tf-plan-reports --gcs-prefix plans/pr-42

# S3
tofui plan.json --build-name "pr-42-$GITHUB_SHA" \
  --s3-bucket my-tf-plan-reports --s3-prefix plans/pr-42

Both upload with Content-Type: text/html so the report renders in the browser rather than downloading, and print a signed URL valid for --signed-url-expiry (default 7d, which is the maximum both providers allow). Pass --no-signed-url for a public bucket where a plain object URL is enough.

When --stdout-tf-log is used, the terraform log is uploaded and signed alongside the report automatically, and the report is pointed at that signed URL — so the log terminal works from the bucket with nothing extra to configure. The log lands next to the report, so a single signed report link stays self-sufficient.

Signing GCS URLs needs a key to sign with: either a service-account key via GOOGLE_APPLICATION_CREDENTIALS, or roles/iam.serviceAccountTokenCreator on the active identity so tofUI can sign through the IAM API (e.g. under Workload Identity Federation).

Contributing

git clone https://github.com/65156/tofUI.git
cd tofUI
python -m venv venv && source venv/bin/activate
pip install -e '.[dev]'
python test_tofui.py

Then fork, branch, and open a pull request.

License

MIT

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

tofui-1.5.0.tar.gz (58.9 kB view details)

Uploaded Source

Built Distribution

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

tofui-1.5.0-py3-none-any.whl (59.5 kB view details)

Uploaded Python 3

File details

Details for the file tofui-1.5.0.tar.gz.

File metadata

  • Download URL: tofui-1.5.0.tar.gz
  • Upload date:
  • Size: 58.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tofui-1.5.0.tar.gz
Algorithm Hash digest
SHA256 b41df75030bf67b644c2663bf8dd7764a312957c38dda0916dc22958b2764d92
MD5 3ce54daec653c5b5c2cdf59e45a39636
BLAKE2b-256 94ac012b132b87eb3be0664eaadc86b7d1f531856915e1b7de10bb67e4963ffd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tofui-1.5.0.tar.gz:

Publisher: release.yml on 65156/tofUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tofui-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: tofui-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 59.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tofui-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5d36c6448acc180561f3107f7c71956a04ece0981dd4438eb67d772c0e7d2d3
MD5 8a121c4ece2761ae8e2f981f83cefc28
BLAKE2b-256 92b687df395c25d4e9c226f46f686486dc9712d36ff3d88894adf8965778943c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tofui-1.5.0-py3-none-any.whl:

Publisher: release.yml on 65156/tofUI

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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