{"id":18887680,"url":"https://github.com/bramus/terraform-gcloud-event-cloud-function","last_synced_at":"2026-02-14T15:03:40.757Z","repository":{"id":66326503,"uuid":"455590713","full_name":"bramus/terraform-gcloud-event-cloud-function","owner":"bramus","description":"Terraform deploy a local folder to a Google Cloud Function that can be triggered via an Event","archived":false,"fork":false,"pushed_at":"2022-02-04T15:12:08.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-09T09:43:40.070Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bramus.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}},"created_at":"2022-02-04T15:06:49.000Z","updated_at":"2025-01-16T07:23:35.000Z","dependencies_parsed_at":"2023-03-09T09:15:55.994Z","dependency_job_id":null,"html_url":"https://github.com/bramus/terraform-gcloud-event-cloud-function","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bramus/terraform-gcloud-event-cloud-function","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramus%2Fterraform-gcloud-event-cloud-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramus%2Fterraform-gcloud-event-cloud-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramus%2Fterraform-gcloud-event-cloud-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramus%2Fterraform-gcloud-event-cloud-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bramus","download_url":"https://codeload.github.com/bramus/terraform-gcloud-event-cloud-function/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bramus%2Fterraform-gcloud-event-cloud-function/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29447768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-08T07:38:57.257Z","updated_at":"2026-02-14T15:03:40.740Z","avatar_url":"https://github.com/bramus.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Google Cloud Platform Event Cloud Function\n\nTerraform deploy a local folder to a Google Cloud Function that can be triggered using an Event\n\n## Basic Usage\n\n```hcl\n# Create a Storage Bucket to store the Cloud Functions in\nresource \"google_storage_bucket\" \"cloudfunctions_bucket\" {\n  name     = \"myproject-cloud-functions\"\n  location = \"europe-west3\"\n}\n\n# Create a cloud function named `hello-world`\nmodule \"cloudfunction--hello-world\" {\n  source          = \"github.com/bramus/terraform-gcloud-event-cloud-function\"\n  bucket_name     = google_storage_bucket.cloudfunctions_bucket.name\n  name            = \"hello-world\"\n  event_resource  = \"projects/my-project/topics/my-topic\"\n}\n```\n\nThe module `terraform-gcloud-event-cloud-function` will:\n\n1. Zip up the contents of the `./cloudfunctions/hello-world` folder\n2. Store the `hello-world.zip` file as an object into the bucket\n3. Create the Cloud Function, linking to the `hello-world.zip` object in the bucket\n4. Configure the Cloud Function to be invoked whenever a Pub/Sub message gets published on the `\"projects/my-project/topics/my-topic\"` Topic\n\n## Variables\n\n### Required Variables\n\n- `bucket_name`: Name of GCS bucket to use to store the Cloud Functions their contents on.\n- `name`: Name of the cloud function\n- `event_resource`: The name or partial URI of the resource from which to observe events. For example, `\"myBucket\"` or `\"projects/my-project/topics/my-topic\"`\n\n### Optional Variables and their defaults\n\n- `source_dir`= `\"./cloudfunctions/${var.name}\"`\n- `description`: `\"${var.name} Event Cloud Function\"`\n- `runtime`: `\"python39\"` _(One of [https://cloud.google.com/functions/docs/concepts/exec#runtimes](https://cloud.google.com/functions/docs/concepts/exec#runtimes))_\n- `entry_point`: `\"__main__\"`\n- `available_memory_mb`: `128`\n- `timeout`: `60`\n- `environment_variables`= `{}`\n- `service_account_email` = `\"\"`\n- `vpc_connector` = `null`\n- `max_instances` = `null`\n- `event_type` = `\"google.pubsub.topic.publish\"` _(One of [https://cloud.google.com/functions/docs/calling/#event_triggers](https://cloud.google.com/functions/docs/calling/#event_triggers))_\n\n## Extended Example (Overriding the defaults)\n\n```hcl\n# Create a Storage Bucket to store the Cloud Functions in\nresource \"google_storage_bucket\" \"cloudfunctions_bucket\" {\n  name     = \"myproject-cloud-functions\"\n  location = \"europe-west3\"\n}\n\n# Create a cloud function named `postprocess-bucket-upload`\nmodule \"cloudfunction--postprocess-bucket-upload\" {\n  source                 = \"github.com/bramus/terraform-gcloud-event-cloud-function\"\n  bucket_name            = google_storage_bucket.cloudfunctions_bucket.name\n  event_trigger          = \"google.storage.object.finalize\"\n  event_resource         = \"name-of-some-bucket-to-watch\"\n  name                   = \"postprocess-bucket-upload\"\n  source_dir             = \"./functions/postprocess-bucket-upload/src\"\n  runtime                = \"php74\"\n  entry_point            = \"postprocessbucketuploadPubsub\"\n  available_memory_mb    = 256\n  timeout                = 120\n  service_account_email  = \"cloud-function-invoker@project.iam.gserviceaccount.com\"\n  vpc_connector          = \"vpc-access-connector-name\"\n  max_instances          = 200\n}\n```\n\n## License\n\n`terraform-gcloud-event-cloud-function` is released under the MIT License. See the enclosed [`LICENSE` file](LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramus%2Fterraform-gcloud-event-cloud-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbramus%2Fterraform-gcloud-event-cloud-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbramus%2Fterraform-gcloud-event-cloud-function/lists"}