I'd like to use Terraform to move multiple GCS bucket objects from one bucket to another bucket to a different location.
I read through Terraform documentation but I couldn't find anything substantial.
I'd like to use Terraform to move multiple GCS bucket objects from one bucket to another bucket to a different location.
I read through Terraform documentation but I couldn't find anything substantial.
Terraform for Cloud Storage provider only handles creation of object. What you can do as a workaround is to use Terraform with Storage Transfer Service which schedules a job that transfers multiple objects to a GCS bucket which either came from AWS S3 or another GCS.
Since this is a GCS to GCS transfer, you can take note of:
transfer specblock, only specify thegcs_data_sourceto indicate that it is a GCS to GCS transfer.scheduleblock specifies the time when the transfer will start. If you intend to execute it just once, you can specify theschedule_end_dateimmediately.The Storage Transfer Service feature also offers guide through the Google Cloud Console should you want to try it out: https://cloud.google.com/storage-transfer/docs/create-manage-transfer-console#configure