terraform-state-mover

command module
v0.0.0-...-91c573e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Go Report Card Actions Status codecov License Release

Terraform State Mover

Helps refactoring terraform code by offering an interactive prompt for the terraform state mv command.

Installation

Using homebrew:

brew install mbode/tap/terraform-state-mover

Alternatively, get a pre-built binary from the latest release or build it yourself using

go get github.com/mbode/terraform-state-mover

Usage

terraform-state-mover # inside a Terraform root directory

Extra arguments after a -- are passed to the terraform plan call. This makes the following possible:

terraform-state-mover -- -var key=value  # set variables
terraform-state-mover -- -var-file=variables.tfvars  # use variable files
terraform-state-mover -- -refresh=false  # skip state refresh
terraform-state-mover -- -parallelism=50  # speed up plan by using more concurrent operations

Hint: If terraform-state-mover is used with the Google Cloud Platform provider and remote state, it is recommended to use --delay=2s, otherwise API rate limits error might occur.

Key mapping

Key Action
⏎ Select
↓ Next
↑ Previous
→ Page Down
← Page Up

Demo

Terraform version compatibility

< 0.10.1 0.10.1…8 0.11.0…15 0.12.0…31 0.13.0…7 0.14.0…11 0.15.0…5 1.0.0…11 1.1.0…9 1.2.0…2
✗ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

Contributing

Pull requests are welcome. Please make sure to update tests as appropriate.

License

MIT

Similar tools

  • tfautomv - Generate Terraform moved blocks automatically for painless refactoring

Documentation

Overview

Terraform-state-mover helps refactoring terraform code by offering an interactive prompt for the `terraform state mv` command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址