terraform-cleaner
« Back to VersTracker
Description:
Tiny utility which detects unused variables in your terraform modules
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Devops
Tags: terraform devops infrastructure-as-code linter cli
Install: brew install terraform-cleaner
About:
TerraformCleaner scans your Terraform configuration files to identify and report on variables that are declared but never used within the codebase. This helps in cleaning up dead code, reducing complexity, and maintaining a more efficient and readable infrastructure-as-code setup. It provides a simple command-line interface to quickly audit your modules for unused definitions.
Key Features:
  • Scans Terraform files for unused variable declarations
  • Provides clear, actionable output listing unused variables
  • Simple command-line interface for easy integration
  • Supports standard Terraform HCL syntax
Use Cases:
  • Cleaning up legacy Terraform modules to reduce technical debt
  • Performing code reviews to ensure all defined variables are necessary
  • Optimizing Terraform configurations before deployment
Alternatives:
  • tflint – tflint is a more comprehensive linter for Terraform that checks for errors, best practices, and style, whereas terraform-cleaner focuses specifically on finding unused variables.
Version History
Detected Version Rev Change Commit
Sep 12, 2025 4:04am 0 VERSION_BUMP f88b8f6a