Ad

tfautomv: Terraform Refactoring Tool

tfautomv automatically generates 'moved' blocks and 'terraform state mv' commands for seamless Terraform resource refactoring, simplifying structural changes without infrastructure alterations.
Screenshot of busser/tfautomv homepage

tfautomv automatically generates moved blocks and [terraform state mv](/adammck/terraform-inventory) commands, significantly simplifying Terraform resource refactoring. When resources are moved between modules or renamed, Terraform loses track of the old resource in its state. tfautomv analyzes Terraform plan output to identify these situations and generates the necessary moved blocks or state mv commands, ensuring Terraform accurately reflects the structural changes without impacting infrastructure state. It supports Terraform, OpenTofu, and Terragrunt.

Notable for its ability to automatically update Terraform state for resource reordering and renaming, tfautomv streamlines refactoring workflows. Its support for both moved blocks and terraform state mv commands offers flexibility. The tool's clear usage and straightforward installation process enhance developer experience, making it accessible to users of varying skill levels. Designed for safety and minimal disruption, it avoids unwanted infrastructure changes during refactoring.

  • Core Functionality: Generates moved blocks and terraform state mv commands.
  • Terraform Support: Compatible with Terraform, OpenTofu, and Terragrunt.
  • Flexibility: Offers both moved block and state mv command output options.
  • Usage Options: Provides various flags for specifying output format and target directories.
  • Integration: Can be used with existing plan files and various tools such as Terragrunt and OpenTofu.
  • Ease of Use: Simple installation and straightforward command-line interface.
  • Debugging: Offers debugging and verbosity options to understand the process.

The project is actively maintained with recent commits and a clear release history. Comprehensive documentation and a growing community suggest a stable and reliable tool. Regular updates and issue resolution indicate ongoing development and improvement, making it suitable for use in production environments.

Developers who need to restructure their Terraform code without altering infrastructure will benefit from tfautomv. It addresses the challenge of maintaining Terraform state during refactoring, offering a safe and efficient way to rename resources, move them between modules, or reorganize their structure. By automating the generation of moved blocks and state mv commands, it significantly reduces the risk of accidental infrastructure changes and streamlines the refactoring process.

Languages:
Summarize:
Share:
Stars
898
Forks
25
Issues
16
Created
4 years ago
Commit
13 days ago
License
APACHE-2.0
Archived
No
Updated 9 days ago

Similar Repositories