Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Make scheduler timezone configurable, default to UTC #1573

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform/service_backup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ resource "google_cloud_scheduler_job" "backup-worker" {
name = "backup-worker"
region = var.cloudscheduler_location
schedule = "0 */4 * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "${google_cloud_run_service.backup.template[0].spec[0].timeout_seconds + 60}s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_cleanup_export.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ resource "google_cloud_scheduler_job" "cleanup-export-worker" {
name = "cleanup-export-worker"
region = var.cloudscheduler_location
schedule = var.cleanup_export_worker_cron_schedule
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_cleanup_exposure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ resource "google_cloud_scheduler_job" "cleanup-exposure-worker" {
name = "cleanup-exposure-worker"
region = var.cloudscheduler_location
schedule = var.cleanup_exposure_worker_cron_schedule
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
4 changes: 2 additions & 2 deletions terraform/service_export.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ resource "google_cloud_scheduler_job" "export-worker" {
name = "export-worker"
region = var.cloudscheduler_location
schedule = var.export_worker_cron_schedule
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand All @@ -203,7 +203,7 @@ resource "google_cloud_scheduler_job" "export-create-batches" {
name = "export-create-batches"
region = var.cloudscheduler_location
schedule = var.export_create_batches_cron_schedule
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
4 changes: 2 additions & 2 deletions terraform/service_export_importer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ resource "google_cloud_scheduler_job" "export-importer-worker" {
name = "export-importer-worker"
region = var.cloudscheduler_location
schedule = "*/5 * * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand All @@ -191,7 +191,7 @@ resource "google_cloud_scheduler_job" "export-importer-schedule" {
name = "export-importer-schedule"
region = var.cloudscheduler_location
schedule = "*/15 * * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_generate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ locals {
resource "google_cloud_scheduler_job" "generate-worker" {
name = "generate-worker"
schedule = var.generate_cron_schedule
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "60s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_jwks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ resource "google_cloud_scheduler_job" "jwks-worker" {
name = "jwks-worker"
region = var.cloudscheduler_location
schedule = "*/2 * * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_keyrotation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ resource "google_cloud_scheduler_job" "key-rotation-worker" {
name = "key-rotation-worker"
region = var.cloudscheduler_location
schedule = "* */4 * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
2 changes: 1 addition & 1 deletion terraform/service_mirror.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ resource "google_cloud_scheduler_job" "mirror-invoke" {
name = "mirror-invoke"
region = var.cloudscheduler_location
schedule = "*/5 * * * *"
time_zone = "America/Los_Angeles"
time_zone = var.cloud_scheduler_timezone
attempt_deadline = "600s"

retry_config {
Expand Down
4 changes: 4 additions & 0 deletions terraform/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ variable "database_backup_schedule" {
description = "Cron schedule in which to do a full backup of the database to Cloud Storage."
}

variable "cloud_scheduler_timezone" {
type = string
default = "Etc/UTC"
}

variable "db_failover_replica_regions" {
type = list(string)
Expand Down