Skip to content

Installation

Terratags can be installed in multiple ways. You don't need to have Go installed to use Terratags.

Binary Installation

The easiest way to install Terratags is to download a pre-built binary from the GitHub Releases page:

  1. Download the appropriate binary for your operating system (Windows, macOS, or Linux)
  2. Extract the archive if necessary
  3. Move the binary to a directory in your PATH

Linux/macOS

# Example for Linux amd64
curl -L https://github.com/terratags/terratags/releases/latest/download/terratags_linux_amd64.tar.gz | tar xz
sudo mv terratags /usr/local/bin/

Windows

Download the appropriate .zip file from the releases page, extract it, and add the location to your PATH.

Homebrew Installation (macOS/Linux)

If you use Homebrew, you can install Terratags with:

brew install terratags/tap/terratags

Go Installation (Alternative)

If you have Go installed, you can also install Terratags using Go's package manager:

go install github.com/terratags/terratags@latest

This will download and install the latest version of Terratags to your Go bin directory.

Prerequisites

  • Terraform (for analyzing Terraform configurations)

Verifying Installation

After installation, you can verify that Terratags is installed correctly by running:

terratags -version

This should display the current version of Terratags.

Building from Source

If you prefer to build from source:

git clone https://github.com/terratags/terratags.git
cd terratags
go build

This will create a terratags binary in your current directory.

Next Steps

After installation, you'll need to:

  1. Create a configuration file that defines your required tags
  2. Run Terratags against your Terraform code
  3. Review the results and fix any non-compliant resources