Created
September 10, 2020 08:28
-
-
Save m4r10k/6ce98d265e0fb9e4ae22972366f8b971 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
# ------- 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