Simple tool for moving / renaming resources in one or several terraform configurations.
Project description
tfmv
Simple tool for moving / renaming resources in one or several terraform configurations.
When moving or renaming resources or modules in terraform configurations, objects in the corresponding state
are typically destroyed and recreated by terraform apply.
This may be impractical, or impossible for certain resources, and the objects in the state must be moved manually, one by one, to prevent this.
This tool helps to automate this state operation.
The operations are:
terraform state pullto get local copies of the remote state(s)terraform state listto identify objects matching the given prefixterraform state mvis called to move or rename the resource based on the prefixterraform state pushto push the modified state back to the remote- clean local files
Usage:
-
rename:
tfmv google_compute_network.old_name google_compute_network.new_name --src /home/vincent/my-project
-
move from root to module:
tfmv google_compute_network.vpc module.my_module.google_compute_network.vpc --src /home/vincent/my-project
-
renaming module:
tfmv module.my_module module.my_module_renamed --src /home/vincent/my-project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tfmv-1.2.tar.gz.
File metadata
- Download URL: tfmv-1.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b96374d4fdbe4657b8677032befa099c43b5977e8bbbf061fbeeadb7c9fb889
|
|
| MD5 |
04e0011883fb83c01de8bf1ad6952fe0
|
|
| BLAKE2b-256 |
ad9b6c02b5c272ca1ef786731de5adeebf43184021969cbed49c46e027fb8ab1
|
File details
Details for the file tfmv-1.2-py3-none-any.whl.
File metadata
- Download URL: tfmv-1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ed4e82d26ea406d974ff42a224272e6c6b8890dd4d1cd9cc366786e73ffe5f9
|
|
| MD5 |
0e131cc69b62218d6dc4284c1d28d1ed
|
|
| BLAKE2b-256 |
d64242cc042d10fbddde8ecd2b674cd2802f3889482eaf36d03169776c256bdf
|