{"id":15222133,"url":"https://github.com/googlecloudplatform/terraform-google-cloud-workflows","last_synced_at":"2025-10-20T01:30:46.380Z","repository":{"id":63339011,"uuid":"534338536","full_name":"GoogleCloudPlatform/terraform-google-cloud-workflows","owner":"GoogleCloudPlatform","description":"Manage Workflows with optional Scheduler or Event Arc triggers","archived":false,"fork":false,"pushed_at":"2024-08-20T02:15:00.000Z","size":110,"stargazers_count":17,"open_issues_count":9,"forks_count":14,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-12-18T08:41:28.785Z","etag":null,"topics":["cft-terraform","developer-tools","serverless-computing"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/GoogleCloudPlatform/cloud-workflows/google","language":"Go","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/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-08T18:14:12.000Z","updated_at":"2024-09-19T01:31:47.000Z","dependencies_parsed_at":"2023-02-09T13:31:27.289Z","dependency_job_id":"7bd3f8dc-5466-4914-9a86-2de6271722ae","html_url":"https://github.com/GoogleCloudPlatform/terraform-google-cloud-workflows","commit_stats":{"total_commits":52,"total_committers":6,"mean_commits":8.666666666666666,"dds":0.5384615384615384,"last_synced_commit":"9c61274542072e5aeb9278b0c8a3c6514ba4603c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fterraform-google-cloud-workflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fterraform-google-cloud-workflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fterraform-google-cloud-workflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fterraform-google-cloud-workflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/terraform-google-cloud-workflows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237243005,"owners_count":19278060,"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","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":["cft-terraform","developer-tools","serverless-computing"],"created_at":"2024-09-28T15:10:44.850Z","updated_at":"2025-10-20T01:30:41.036Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"Go","readme":"# terraform-google-cloud-workflow\n\nThis module is used to create a [Workflow](https://cloud.google.com/workflows/docs) and trigger can be set on it either using a Cloud Scheduler or a Event Arc Trigger\n\nThe resources/services/activations/deletions that this module will create/trigger are:\n\n- Creates a Workflow\n- Creates either a Cloud Scheduler OR  Event Arc Trigger\n\n## Usage\n\n* Usage of this module for scheduling a Workflows using a Cloud Scheduler:\n\n```hcl\nmodule \"cloud_workflow\" {\n  source  = \"GoogleCloudPlatform/cloud-workflows/google\"\n  version = \"~\u003e 0.1\"\n\n  workflow_name         = \"wf-sample\"\n  region                = \"us-central1\"\n  service_account_email = \"\u003csvc_account\u003e\"\n  workflow_trigger = {\n    cloud_scheduler = {\n      name                  = \"workflow-job\"\n      cron                  = \"*/3 * * * *\"\n      time_zone             = \"America/New_York\"\n      deadline              = \"320s\"\n      service_account_email = \"\u003csvc_account\u003e\"\n    }\n  }\n  workflow_source       = \u003c\u003c-EOF\n  - getCurrentTime:\n      call: http.get\n      args:\n          url: https://us-central1-workflowsample.cloudfunctions.net/datetime\n      result: CurrentDateTime\n  - readWikipedia:\n      call: http.get\n      args:\n          url: https://en.wikipedia.org/w/api.php\n          query:\n              action: opensearch\n              search: $${CurrentDateTime.body.dayOfTheWeek}\n      result: WikiResult\n  - returnOutput:\n      return: $${WikiResult.body[1]}\nEOF\n}\n```\n\n* Usage of this module to trigger Workflow using Event Arc Trigger:\n\n```hcl\nmodule \"cloud_workflow\" {\n  source  = \"GoogleCloudPlatform/cloud-workflows/google\"\n  version = \"~\u003e 0.1\"\n\n  workflow_name         = \"wf-sample\"\n  region                = \"us-central1\"\n  service_account_email = \"\u003csvc_account\u003e\"\n  workflow_trigger = {\n    event_arc = {\n      name                  = \"trigger-pubsub-workflow-tf\"\n      service_account_email = \"\u003csvc_account\u003e\"\n      matching_criteria = [{\n        attribute = \"type\"\n        value     = \"google.cloud.pubsub.topic.v1.messagePublished\"\n      }]\n    }\n  }\n  workflow_source       = \u003c\u003c-EOF\n  - getCurrentTime:\n      call: http.get\n      args:\n          url: https://us-central1-workflowsample.cloudfunctions.net/datetime\n      result: CurrentDateTime\n  - readWikipedia:\n      call: http.get\n      args:\n          url: https://en.wikipedia.org/w/api.php\n          query:\n              action: opensearch\n              search: $${CurrentDateTime.body.dayOfTheWeek}\n      result: WikiResult\n  - returnOutput:\n      return: $${WikiResult.body[1]}\nEOF\n}\n```\n\nFunctional examples are included in the\n[examples](./examples/) directory.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| project\\_id | The project ID to deploy to | `string` | n/a | yes |\n| region | The name of the region where workflow will be created | `string` | n/a | yes |\n| service\\_account\\_create | Auto-create service account. | `bool` | `false` | no |\n| service\\_account\\_email | Service account email. Unused if service account is auto-created. | `string` | `null` | no |\n| workflow\\_description | Description for the cloud workflow | `string` | `\"Sample workflow Description\"` | no |\n| workflow\\_labels | A set of key/value label pairs to assign to the workflow | `map(string)` | `{}` | no |\n| workflow\\_name | The name of the cloud workflow to create | `string` | n/a | yes |\n| workflow\\_source | Workflow YAML code to be executed. The size limit is 32KB. | `string` | n/a | yes |\n| workflow\\_trigger | Trigger for the Workflow . Cloud Scheduler OR Event Arc | \u003cpre\u003eobject({\u003cbr\u003e    cloud_scheduler = optional(object({\u003cbr\u003e      name                  = string\u003cbr\u003e      cron                  = string\u003cbr\u003e      time_zone             = string\u003cbr\u003e      deadline              = string\u003cbr\u003e      argument              = optional(string)\u003cbr\u003e      service_account_email = string\u003cbr\u003e    }))\u003cbr\u003e    event_arc = optional(object({\u003cbr\u003e      name                  = string\u003cbr\u003e      service_account_email = string\u003cbr\u003e      matching_criteria = set(object({\u003cbr\u003e        attribute = string\u003cbr\u003e        operator  = optional(string)\u003cbr\u003e        value     = string\u003cbr\u003e      }))\u003cbr\u003e      pubsub_topic_id = optional(string)\u003cbr\u003e    }))\u003cbr\u003e  })\u003c/pre\u003e | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| event\\_arc\\_id | Google Event Arc id |\n| scheduler\\_job\\_id | Google Cloud scheduler job id |\n| workflow\\_id | Workflow identifier for the resource with format projects/{{project}}/locations/{{region}}/workflows/{{name}} |\n| workflow\\_region | The region of the workflow. |\n| workflow\\_revision\\_id | The revision of the workflow. A new one is generated if the service account or source contents is changed. |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Requirements\n\nThese sections describe requirements for using this module.\n\n### Software\n\nThe following dependencies must be available:\n\n- [Terraform][terraform] v0.13\n- [Terraform Provider for GCP][terraform-provider-gcp] plugin v3.0\n\n### Service Account\n\nA service account with the following roles must be used to provision\nthe resources of this module:\n\n- Storage Admin: `roles/storage.admin`\n\nThe [Project Factory module][project-factory-module] and the\n[IAM module][iam-module] may be used in combination to provision a\nservice account with the necessary roles applied.\n\n### APIs\n\nA project with the following APIs enabled must be used to host the\nresources of this module:\n\n- Google Cloud Storage JSON API: `storage-api.googleapis.com`\n\nThe [Project Factory module][project-factory-module] can be used to\nprovision a project with the necessary APIs enabled.\n\n## Contributing\n\nRefer to the [contribution guidelines](./CONTRIBUTING.md) for\ninformation on contributing to this module.\n\n[iam-module]: https://registry.terraform.io/modules/terraform-google-modules/iam/google\n[project-factory-module]: https://registry.terraform.io/modules/terraform-google-modules/project-factory/google\n[terraform-provider-gcp]: https://www.terraform.io/docs/providers/google/index.html\n[terraform]: https://www.terraform.io/downloads.html\n\n## Security Disclosures\n\nPlease see our [security disclosure process](./SECURITY.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fterraform-google-cloud-workflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglecloudplatform%2Fterraform-google-cloud-workflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglecloudplatform%2Fterraform-google-cloud-workflows/lists"}