{"id":20148239,"url":"https://github.com/chainguard-dev/terraform-google-cron","last_synced_at":"2025-09-09T05:32:44.839Z","repository":{"id":173691761,"uuid":"608734835","full_name":"chainguard-dev/terraform-google-cron","owner":"chainguard-dev","description":"Terraform module for deploying cron jobs that run on a defined schedule","archived":false,"fork":false,"pushed_at":"2025-07-01T07:45:54.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T08:37:59.225Z","etag":null,"topics":["cloudrun","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainguard-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-02T16:20:56.000Z","updated_at":"2025-07-01T07:45:57.000Z","dependencies_parsed_at":"2023-10-12T08:48:48.621Z","dependency_job_id":"d07c8630-7f3a-41c9-942a-a624c7be13bb","html_url":"https://github.com/chainguard-dev/terraform-google-cron","commit_stats":null,"previous_names":["chainguard-dev/terraform-google-cron"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chainguard-dev/terraform-google-cron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fterraform-google-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fterraform-google-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fterraform-google-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fterraform-google-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainguard-dev","download_url":"https://codeload.github.com/chainguard-dev/terraform-google-cron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainguard-dev%2Fterraform-google-cron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274249577,"owners_count":25249390,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudrun","terraform","terraform-module"],"created_at":"2024-11-13T22:35:57.306Z","updated_at":"2025-09-09T05:32:44.812Z","avatar_url":"https://github.com/chainguard-dev.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud Run-based cron jobs.\n\nThis repository contains a terraform module for deploying cron jobs that run on a defined schedule.\n\n## Defining a custom cron job.\n\nA cron job can be defined as a simple Go program, with as little code as:\n\n```go\nimport \"log\"\n\nfunc main() {\n    log.Println(\"hello\")\n}\n```\n\n\u003e See our [example](./example/).\n\n## Deploying a custom cron job\n\nWith the terraform module provided here, a cron job can be deployed with a little\nconfiguration as:\n\n```terraform\nmodule \"cron\" {\n  source  = \"chainguard-dev/cron/google\"\n  version = \"v0.1.2\"\n\n  name       = \"example\"\n  project_id = var.project_id\n  schedule   = \"*/8 * * * *\"  # Every 8 minutes.\n\n  importpath  = \"github.com/chainguard-dev/terraform-google-cron/example\"\n  working_dir = path.module\n}\n```\n\n\u003e See our [example](./example/).\n\n## Passing additional configuration\n\nYou can pass additional configuration to your custom cron jobs via environment\nvariables passed to the application. These can be specified in the module:\n\n```terraform\n  env = {\n    \"FOO\" : \"bar\"\n  }\n```\n\n\u003e See our [example](./example/).\n\nor as from a secret in Google Secret Manager:\n\n```terraform\n  env_secret = {\n    \"FOO\" : \"secret_name_in_secret_manager\"\n  }\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\nNo requirements.\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_google\"\u003e\u003c/a\u003e [google](#provider\\_google) | n/a |\n| \u003ca name=\"provider_ko\"\u003e\u003c/a\u003e [ko](#provider\\_ko) | n/a |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [google_cloud_run_v2_job.job](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_job) | resource |\n| [google_cloud_run_v2_job_iam_binding.authorize-calls](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_job_iam_binding) | resource |\n| [google_cloud_scheduler_job.cron](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_scheduler_job) | resource |\n| [google_project_service.cloud_run_api](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |\n| [google_project_service.cloudscheduler](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |\n| [google_service_account.delivery](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |\n| [ko_build.image](https://registry.terraform.io/providers/ko-build/ko/latest/docs/resources/build) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_base_image\"\u003e\u003c/a\u003e [base\\_image](#input\\_base\\_image) | The base image that will be used to build the container image. | `string` | `\"cgr.dev/chainguard/static:latest-glibc\"` | no |\n| \u003ca name=\"input_cpu\"\u003e\u003c/a\u003e [cpu](#input\\_cpu) | The CPU limit for the job. | `string` | `\"1000m\"` | no |\n| \u003ca name=\"input_env\"\u003e\u003c/a\u003e [env](#input\\_env) | A map of custom environment variables (e.g. key=value) | `map` | `{}` | no |\n| \u003ca name=\"input_execution_environment\"\u003e\u003c/a\u003e [execution\\_environment](#input\\_execution\\_environment) | The execution environment to use for the job. | `string` | `\"\"` | no |\n| \u003ca name=\"input_importpath\"\u003e\u003c/a\u003e [importpath](#input\\_importpath) | The import path that contains the cron application. | `string` | n/a | yes |\n| \u003ca name=\"input_max_retries\"\u003e\u003c/a\u003e [max\\_retries](#input\\_max\\_retries) | The maximum number of times to retry the job. | `number` | `3` | no |\n| \u003ca name=\"input_memory\"\u003e\u003c/a\u003e [memory](#input\\_memory) | The memory limit for the job. | `string` | `\"512Mi\"` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name to prefix to created resources. | `any` | n/a | yes |\n| \u003ca name=\"input_project_id\"\u003e\u003c/a\u003e [project\\_id](#input\\_project\\_id) | The project that will host the cron job. | `string` | n/a | yes |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | The region to run the job. | `string` | `\"us-east4\"` | no |\n| \u003ca name=\"input_repository\"\u003e\u003c/a\u003e [repository](#input\\_repository) | Container repository to publish images to. | `string` | `\"\"` | no |\n| \u003ca name=\"input_schedule\"\u003e\u003c/a\u003e [schedule](#input\\_schedule) | The cron schedule on which to run the job. | `any` | n/a | yes |\n| \u003ca name=\"input_secret_env\"\u003e\u003c/a\u003e [secret\\_env](#input\\_secret\\_env) | A map of secrets to mount as environment variables from Google Secrets Manager (e.g. secret\\_key=secret\\_name) | `map` | `{}` | no |\n| \u003ca name=\"input_service_account\"\u003e\u003c/a\u003e [service\\_account](#input\\_service\\_account) | The email address of the service account to run the service as, and to invoke the job as. | `string` | n/a | yes |\n| \u003ca name=\"input_timeout\"\u003e\u003c/a\u003e [timeout](#input\\_timeout) | The maximum amount of time in seconds to allow the job to run. | `string` | `\"600s\"` | no |\n| \u003ca name=\"input_vpc_access\"\u003e\u003c/a\u003e [vpc\\_access](#input\\_vpc\\_access) | The VPC to send egress to. For more information, visit https://cloud.google.com/run/docs/configuring/vpc-direct-vpc | \u003cpre\u003eobject({\u003cbr/\u003e    # Currently, only one network interface is supported.\u003cbr/\u003e    network_interfaces = list(object({\u003cbr/\u003e      network    = string\u003cbr/\u003e      subnetwork = string\u003cbr/\u003e      tags       = optional(list(string))\u003cbr/\u003e    }))\u003cbr/\u003e    # Egress is one of \"PRIVATE_RANGES_ONLY\", \"ALL_TRAFFIC\", or \"ALL_PRIVATE_RANGES\"\u003cbr/\u003e    egress = string\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_working_dir\"\u003e\u003c/a\u003e [working\\_dir](#input\\_working\\_dir) | The working directory that contains the importpath. | `string` | n/a | yes |\n\n## Outputs\n\nNo outputs.\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fterraform-google-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainguard-dev%2Fterraform-google-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainguard-dev%2Fterraform-google-cron/lists"}