When refactoring a Terraform codebase, you often need to write moved
blocks. This can be tedious. Let
tfautomv
do it for you.
When you move a resource in your code, Terraform loses track of the resource's state. The next time you run Terraform, it will plan to delete the resource it has memory of and create the "new" resource it found in your refactored code.
tfautomv
inspects the output of terraform plan
, detects such
creation/deletion pairs and writes a moved
block so that Terraform now knows
no deletion or creation is required.
This demo illustrates tfautomv's core features:
- Generating
moved
blocks automatically for refactored code - Optionally doing a dry run
- Optionally showing a detailed analysis
See Getting started / Installation for instructions.
See Getting started / Tutorial for a hands-on guided introduction de tfautomv.
See Usage for a list of tfautomv's features.
The following versions of Terraform are supported:
1.1.x
and above by default0.13.x
and above when using the-output=commands
flag
See Design for details on how tfautomv works under the hood.
The code is licensed under the permissive Apache v2.0 license. Read this for a summary.