Skip to main content

Installation

Complete installation guide for tf2report across different platforms and methods.

System Requirements

  • Operating System: Linux, macOS, or Windows
  • Go: 1.25 or later (for building from source)
  • Terraform: Any recent version (for generating plans)

Installation Methods

Using Go Install

The simplest and recommended method:

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

This installs the latest version to $GOPATH/bin/tf2report.

Verify Installation

tf2report --help

Update to Latest Version

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

From Source

Build from source for the latest development version or to contribute:

Clone Repository

git clone https://github.com/germainlefebvre4/tf2report.git
cd tf2report

Build

make build

This creates the binary at bin/tf2report.

Install System-Wide (Optional)

sudo make install

This copies the binary to /usr/local/bin/tf2report.

Development Build

For development with additional checks:

make dev

Using Docker (Coming Soon)

Docker images will be available soon:

# Pull the image
docker pull germainlefebvre4/tf2report:latest

# Run tf2report
docker run --rm -v $(pwd):/workspace germainlefebvre4/tf2report:latest \
--plan /workspace/terraform.tfplan.json

Download Pre-built Binaries (Coming Soon)

Pre-built binaries for each release will be available on the GitHub Releases page.

Platform-Specific Instructions

Linux

Using Go Install

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

Add to PATH

If the command isn't found, add Go's bin directory to your PATH:

echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.bashrc
source ~/.bashrc

For other shells (zsh, fish), modify the appropriate rc file.

macOS

Using Go Install

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

Add to PATH

echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.zshrc
source ~/.zshrc

Using Homebrew (Coming Soon)

brew install tf2report

Windows

Using Go Install

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

The binary will be installed to %GOPATH%\bin\tf2report.exe.

Add to PATH

Add %GOPATH%\bin to your system PATH:

  1. Open System Properties → Advanced → Environment Variables
  2. Edit the Path variable
  3. Add C:\Users\<YourUsername>\go\bin (or your GOPATH)

Verify Installation

Check the version and that tf2report is working:

tf2report --help

You should see the help output with available commands and options.

Updating tf2report

Go Install

Simply reinstall with the latest tag:

go install github.com/germainlefebvre4/tf2report/cmd/tf2report@latest

From Source

Pull the latest changes and rebuild:

cd tf2report
git pull origin main
make build
sudo make install

Uninstalling

Go Install

Remove the binary from your Go bin directory:

rm $(go env GOPATH)/bin/tf2report

System Installation

If installed system-wide:

sudo rm /usr/local/bin/tf2report

Build Options

When building from source, several Make targets are available:

Standard Build

make build

Creates optimized binary in bin/tf2report.

Development Build

make dev

Builds with race detection and additional checks.

Clean Build

make clean
make build

Removes old binaries and builds fresh.

Install

make install

Installs to /usr/local/bin (requires sudo).

Run Tests

make test

Format Code

make fmt

Tidy Dependencies

make tidy

Troubleshooting

Command Not Found

Problem: tf2report: command not found

Solution: Ensure $GOPATH/bin is in your PATH:

export PATH="$PATH:$(go env GOPATH)/bin"

Add this to your shell profile (.bashrc, .zshrc, etc.) to make it permanent.

Permission Denied

Problem: Permission denied when running make install

Solution: Use sudo:

sudo make install

Go Version Error

Problem: go: golang.org/toolchain@v0.0.1-go1.25.0.linux-amd64 requires go >= 1.25

Solution: Update Go to version 1.25 or later:

# Using gvm (Go Version Manager)
gvm install go1.25
gvm use go1.25

# Or download from https://golang.org/dl/

Build Fails

Problem: Build errors or missing dependencies

Solution: Clean and rebuild:

make clean
make deps
make build

Next Steps