This is a tool that simplifies various repetitive tasks that need to be performed when refactoring Terraform modules.
You will need Go to be able to build and install the tool.
- Clone the repo
- Install the executable with
go install
.
Refer to the output of terraform-refactor-helper --help
for usage instructions.
The tool allows the user to provide a list of resource address prefixes that will be used as filters to extract resources from a source state and import them to a destination state.
The tool allows the user to provider a list of resource prefixes that will be used as filters to remove resources from a Terraform state. This is a highly destructive operation, so the Terraform state should be backed up locally before the operation.
- Add tests.
- Add a CI/CD workflow.