Created
April 26, 2020 20:46
-
-
Save pascalwhoop/ad20756c88d0d8757791f0d78e871a57 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
gcloud rsync -r gs://our-bucket /tmp/bucket | |
cd 0-bootstrap && vim backend.tf #comment out backend | |
terraform init #approve copying state to local | |
gcloud rm -r gs://our-bucket #delete all data | |
terraform apply #force recreates bucket in different region | |
gcloud rsync -r /tmp/bucket gs://our-bucket #bring state files back | |
gcloud rm -r gs://our-bucket/terraform/state/bootstrap #clean old state | |
vim backend.tf #uncomment the backend again | |
terraform init #copy state back to bucket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment