tfmv
« Back to VersTracker
Description:
CLI to rename Terraform resources and generate moved blocks
Type: Formula  |  Latest Version: 1.0.0@0  |  Tracked Since: Dec 6, 2025
Links: Homepage  |  formulae.brew.sh
Category: Devops
Tags: terraform devops infrastructure-as-code refactoring cli
Install: brew install tfmv
About:
tfmv is a CLI tool designed to streamline Terraform refactoring by automatically detecting resource renames in your code. It generates 'moved' blocks to update state without manual state manipulation and can also rename resource blocks in your configuration files. This reduces the risk of errors during infrastructure refactoring.
Key Features:
  • Automatically detects renamed Terraform resources
  • Generates 'moved' blocks for safe state updates
  • Renames resource blocks in configuration files
  • Supports custom mapping for complex refactors
Use Cases:
  • Refactoring Terraform resource names without losing state
  • Automating the creation of moved blocks during large codebase changes
  • Cleaning up technical debt in infrastructure-as-code projects
Alternatives:
  • Terragrunt – Terragrunt is a wrapper for Terraform that manages remote state and configuration, but does not specifically automate resource renaming or moved block generation.
  • manual state mv – The native 'terraform state mv' command requires manual execution for each resource, which is error-prone and slow for large-scale refactors.
Version History
Detected Version Rev Change Commit
Dec 6, 2025 2:22pm 0 VERSION_BUMP d18227ef
Oct 9, 2025 4:57pm 0 VERSION_BUMP a5aedde5
Sep 12, 2025 12:41am 0 VERSION_BUMP 59477907