IaC Bazaar
Google CloudLive-tested

Cloud Scheduler HTTP Cron Job

A Cloud Scheduler cron job that calls an HTTP(S) endpoint on a schedule, with a bounded attempt deadline, capped exponential-backoff retries, and per-invocation OIDC/OAuth service-account auth.

terraformGoogle Cloud#gcp
gcp-cloud-schedulerterraform v1.7

Verification

Live-tested

Really deployed, verified, idempotent and destroyed in a cloud sandbox.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan (Checkov)
  • Plan tests (mocked: validation rules · outputs)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested — applied, verified, destroyed

Last verified 2026-06-30 · how we verify

Documentation

gcp-cloud-scheduler

A Cloud Scheduler cron job that calls an HTTP(S) endpoint on a schedule, with the retry and timeout controls hand-rolled jobs usually skip: a bounded attempt deadline, a capped exponential-backoff retry policy, and optional service-account auth (OIDC for Cloud Run / Cloud Functions / IAP, OAuth for Google APIs). Works with Terraform and OpenTofu (>= 1.6), Google provider >= 7.0, < 8.0.

Secure defaults:

  • When an auth service account is supplied, the scheduler mints a short-lived OIDC/OAuth token per invocation — no static credential in the request.
  • The attempt deadline and retry backoff are bounded, so a hung or flapping endpoint can't pin executions open or hammer a downstream forever.
  • Cloud Scheduler in a supported region (e.g. us-central1) no longer needs an App Engine application.

Requirements

RequirementVersion
Terraform / OpenTofu>= 1.6
hashicorp/google>= 7.0, < 8.0

The Cloud Scheduler API (cloudscheduler.googleapis.com) must be enabled. The auth service account (if used) must be granted invoker permission on the target endpoint — that grant is target-scoped and stays outside this module.

Verification

Static-validated (fmt, validate, tflint). Live apply/destroy testing pending cloud sandbox availability — see catalog status.

License

Commercial — IaC Bazaar EULA. © IaC Bazaar. Original work (not derived from a third-party module).

Usage code & full reference unlock after purchase

The complete copy-paste usage, the full input/output reference, and operational notes ship with your licence — shown here and bundled in the download.

  • Usage
  • Inputs
  • Outputs