Skip to content

Instantly share code, notes, and snippets.

@m4r10k
Created September 10, 2020 08:28
Show Gist options
  • Save m4r10k/6ce98d265e0fb9e4ae22972366f8b971 to your computer and use it in GitHub Desktop.
Save m4r10k/6ce98d265e0fb9e4ae22972366f8b971 to your computer and use it in GitHub Desktop.
# ------- artifacts --------
resource "google_storage_transfer_job" "artifacts-<your source google project id>-backup" {
description = "artifacts-<your source google project id> backup job"
project = local.project
transfer_spec {
transfer_options {
delete_objects_unique_in_sink = true
}
gcs_data_source {
bucket_name = "artifacts-<your source google project id>"
}
gcs_data_sink {
bucket_name = google_storage_bucket.artifacts-<your source google project id>-backup.name
}
}
schedule {
schedule_start_date {
year = 2020
month = 9
day = 1
}
schedule_end_date {
year = 2100
month = 12
day = 31
}
start_time_of_day {
hours = 21
minutes = 30
seconds = 0
nanos = 0
}
}
depends_on = [google_storage_bucket.artifacts-<your source google project id>-backup]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment