Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

changing zone of VM - lose data

I change the zone of my vm and ran my terraform job but i dont see my data on the vm anymore

 

was it a complete delete and redeploy?

3 3 197
3 REPLIES 3

Hello @gcp888  ,Welcome on Google Cloud Community.

Yes. Disks are zone-related, so if you changed zone from us-central1-a to us-central1-b , terraform will destroy VM and create new one.

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost

what option do i have to move it to another zone with data i want to keep

1. Create second VM at target zone and rsync data
2. Create REGIONAL disk, attach to VM, copy/paste data, detach DISK. Mount to second VM ( if needed)