Terratag
A CLI tool to manage tags on Terraform resources.
Overview
Terratag is a utility that recursively scans a directory of Terraform files and applies a consistent set of tags to all resources that support them. This helps solve the common problem of ensuring all cloud resources are properly tagged for cost allocation, ownership, or automation. It works by parsing the HCL and injecting the specified tags, saving significant manual effort.
✨ Key Features
- Recursively scans and tags resources
- Applies a common set of tags defined by the user
- Works across all Terraform providers
- Can be used as a pre-commit hook or in CI
🎯 Key Differentiators
- Simple, focused command-line utility.
- Modifies the HCL files directly.
- Easy to integrate into any workflow.
Unique Value: Automates the tedious and error-prone process of applying consistent tags to all resources in a Terraform project.
🎯 Use Cases (3)
✅ Best For
- Running `terratag` in a CI pipeline before `terraform plan` to ensure all new resources are tagged.
- As a pre-commit hook to automatically tag resources before code is committed.
💡 Check With Vendor
Verify these considerations match your specific requirements:
- Security scanning.
- End-to-end testing.
🏆 Alternatives
While other tools might offer tagging as part of a larger feature set, Terratag is a lightweight, standalone utility that does one thing and does it well.
💻 Platforms
✅ Offline Mode Available
🔌 Integrations
💰 Pricing
Free tier: Fully open-source and free.
🔄 Similar Tools in Terraform Test Frameworks
Terratest
A Go library that provides patterns and helper functions for testing infrastructure, with first-clas...
Checkov
An open-source static analysis tool for scanning infrastructure as code (IaC) files for misconfigura...
tfsec
An open-source static analysis tool that checks Terraform code for security misconfigurations and co...
Infracost
A CLI tool and API that shows cloud cost estimates for Terraform projects, helping developers see th...
Open Policy Agent (OPA)
An open-source, general-purpose policy engine that can be used to enforce policies on Terraform plan...
Spacelift
A specialized CI/CD and management platform for Terraform, Pulumi, and other IaC tools, with a focus...