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 spec
block, only specify thegcs_data_source
to indicate that it is a GCS to GCS transfer.schedule
block specifies the time when the transfer will start. If you intend to execute it just once, you can specify theschedule_end_date
immediately.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