結論
paused = true
を指定してスケジューラを止めた状態で作成すると、paused
の記述を消しただけでは再開されない
記述変更
resource "google_cloud_scheduler_job" "sample" {
+ paused = false
- paused = true
name = "sample-schedular"
description = "定期実行サンプル"
schedule = "0 19 * * *"
time_zone = "Asia/Tokyo"
attempt_deadline = "100s"
retry_config {
retry_count = 1
min_backoff_duration = "60s"
}
http_target {
http_method = "POST"
uri = "https://workflowexecutions.googleapis.com/v1/projects/${var.pid}/locations/${var.region}/workflows/${google_workflows_workflow.sample.name}/executions"
oauth_token {
service_account_email = google_service_account.sample.email
}
}
}
差分が認識されない
pausedはoptionalなんですけどね....
resource "google_cloud_scheduler_job" "sample" {
+ # paused = true
name = "sample-schedular"
description = "定期実行サンプル"
schedule = "0 19 * * *"
time_zone = "Asia/Tokyo"
attempt_deadline = "100s"
retry_config {
retry_count = 1
min_backoff_duration = "60s"
}
http_target {
http_method = "POST"
uri = "https://workflowexecutions.googleapis.com/v1/projects/${var.pid}/locations/${var.region}/workflows/${google_workflows_workflow.sample.name}/executions"
oauth_token {
service_account_email = google_service_account.sample.email
}
}
}