Created
July 4, 2019 08:00
-
-
Save bjonord/7d72e298c41ee21766045812ef906712 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a local copy of the destination project state | |
cd project_dest | |
terraform state pull > remote.tfstate | |
# Move from the SRC project to the DEST project | |
cd ../project_src | |
terraform state mv \ | |
-state-out=../project_dest/remote.tfstate \ | |
module.XYZ module.XYZ | |
# Push the local file to your remote backend (eg S3) | |
cd ../project_dest | |
terraform state push remote.tfstate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment