{"id":21725283,"url":"https://github.com/jameswoolfenden/terraform-gcp-cloudfunction","last_synced_at":"2025-04-12T22:53:31.838Z","repository":{"id":81359295,"uuid":"221303714","full_name":"JamesWoolfenden/terraform-gcp-cloudfunction","owner":"JamesWoolfenden","description":"For your cloud functions to GCP","archived":false,"fork":false,"pushed_at":"2024-01-26T12:18:17.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T22:52:52.754Z","etag":null,"topics":["cloudfunction","gcp","module","terraform"],"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/JamesWoolfenden.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-12T20:16:10.000Z","updated_at":"2022-09-04T08:12:28.000Z","dependencies_parsed_at":"2024-01-26T13:48:35.946Z","dependency_job_id":null,"html_url":"https://github.com/JamesWoolfenden/terraform-gcp-cloudfunction","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-gcp-cloudfunction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-gcp-cloudfunction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-gcp-cloudfunction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamesWoolfenden%2Fterraform-gcp-cloudfunction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamesWoolfenden","download_url":"https://codeload.github.com/JamesWoolfenden/terraform-gcp-cloudfunction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643043,"owners_count":21138353,"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":["cloudfunction","gcp","module","terraform"],"created_at":"2024-11-26T03:16:58.579Z","updated_at":"2025-04-12T22:53:31.786Z","avatar_url":"https://github.com/JamesWoolfenden.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-gcp-cloudfunction\n\n[![Build Status](https://github.com/JamesWoolfenden/terraform-gcp-cloudfunction/workflows/Verify/badge.svg?branch=master)](https://github.com/JamesWoolfenden/terraform-gcp-cloudfunction/actions)\n[![Latest Release](https://img.shields.io/github/release/JamesWoolfenden/terraform-gcp-cloudfunction.svg)](https://github.com/JamesWoolfenden/terraform-gcp-cloudfunction/releases/latest)\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/JamesWoolfenden/terraform-gcp-cloudfunction.svg?label=latest)](https://github.com/JamesWoolfenden/terraform-gcp-cloudfunction/releases/latest)\n![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.14.0-blue.svg)\n[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/JamesWoolfenden/terraform-gcp-cloudfunction/cis_aws)](https://www.bridgecrew.cloud/link/badge?vcs=github\u0026fullRepo=JamesWoolfenden%2Fterraform-gcp-cloudfunction\u0026benchmark=CIS+AWS+V1.2)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![checkov](https://img.shields.io/badge/checkov-verified-brightgreen)](https://www.checkov.io/)\n[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/jameswoolfenden/terraform-gcp-cloudfunction/general)](https://www.bridgecrew.cloud/link/badge?vcs=github\u0026fullRepo=JamesWoolfenden%2Fterraform-gcp-cloudfunction\u0026benchmark=INFRASTRUCTURE+SECURITY)\n[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/jameswoolfenden/terraform-gcp-cloudfunction/cis_gcp)](https://www.bridgecrew.cloud/link/badge?vcs=github\u0026fullRepo=JamesWoolfenden%2Fterraform-gcp-cloudfunction\u0026benchmark=CIS+GCP+V1.1)\n\nThe working cloudfunction module and example.\n\n## Usage\n\nAdd **module.cloudfunction.tf** to your code:-\n\n```terraform\nmodule cloudfunction {\n    source        =\"jameswoolfenden/cloudfunction/gcp\"\n    version       = \"0.0.4\"\n    common_tags   = var.common_tags\n    lambda        = var.lambda\n    project       = var.project\n    region        = var.region\n    sourcezippath = var.sourcezippath\n}\n```\n\nSee **examplea.auto.tfvars** for the data to drive the module.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\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\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [google_cloudfunctions_function.lambda](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloudfunctions_function) | resource |\n| [google_cloudfunctions_function_iam_member.invoker](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloudfunctions_function_iam_member) | resource |\n| [google_storage_bucket.bucket](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket) | resource |\n| [google_storage_bucket_object.archive](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_common_tags\"\u003e\u003c/a\u003e [common\\_tags](#input\\_common\\_tags) | This is to help you add tags to your cloud objects | `map(any)` | n/a | yes |\n| \u003ca name=\"input_invoker\"\u003e\u003c/a\u003e [invoker](#input\\_invoker) | Set who can invoke the lambda | `any` | n/a | yes |\n| \u003ca name=\"input_lambda\"\u003e\u003c/a\u003e [lambda](#input\\_lambda) | A map object that populates the majority of cloudfunction settings | `map(any)` | n/a | yes |\n| \u003ca name=\"input_location\"\u003e\u003c/a\u003e [location](#input\\_location) | n/a | `string` | `\"eu\"` | no |\n| \u003ca name=\"input_project\"\u003e\u003c/a\u003e [project](#input\\_project) | GCP project | `string` | n/a | yes |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | GCP region | `string` | n/a | yes |\n| \u003ca name=\"input_sourcezippath\"\u003e\u003c/a\u003e [sourcezippath](#input\\_sourcezippath) | Full path to source zip file | `string` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_bucket\"\u003e\u003c/a\u003e [bucket](#output\\_bucket) | n/a |\n| \u003ca name=\"output_function\"\u003e\u003c/a\u003e [function](#output\\_function) | n/a |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Role and Permissions\n\n\u003c!-- BEGINNING OF PRE-COMMIT-PIKE DOCS HOOK --\u003e\nThe Terraform resource required is:\n\n```golang\n\nresource \"google_project_iam_custom_role\" \"terraform_pike\" {\n  project     = \"pike\"\n  role_id     = \"terraform_pike\"\n  title       = \"terraform_pike\"\n  description = \"A user with least privileges\"\n  permissions = [\n    \"cloudfunctions.functions.create\",\n    \"cloudfunctions.functions.delete\",\n    \"cloudfunctions.functions.get\",\n    \"cloudfunctions.functions.getIamPolicy\",\n    \"cloudfunctions.functions.setIamPolicy\",\n    \"cloudfunctions.functions.update\",\n    \"cloudfunctions.operations.get\",\n    \"iam.serviceAccounts.actAs\",\n    \"storage.buckets.create\",\n    \"storage.buckets.delete\",\n    \"storage.buckets.get\",\n    \"storage.buckets.update\",\n    \"storage.objects.create\",\n    \"storage.objects.delete\",\n    \"storage.objects.get\"\n  ]\n}\n\n\n```\n\u003c!-- END OF PRE-COMMIT-PIKE DOCS HOOK --\u003e\n\n## Related Projects\n\nCheck out these related projects.\n\n- [terraform-aws-codecommit](https://github.com/jameswoolfenden/terraform-aws-codebuild) - Storing ones code\n\n## Help\n\n**Got a question?**\n\nFile a GitHub [issue](https://github.com/jameswoolfenden/terraform-gcp-cloudfunction/issues).\n\n## Contributing\n\n### Bug Reports \u0026 Feature Requests\n\nPlease use the [issue tracker](https://github.com/jameswoolfenden/terraform-gcp-cloudfunction/issues) to report any bugs or file feature requests.\n\n## Copyrights\n\nCopyright © 2019-2023 James Woolfenden\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nSee [LICENSE](LICENSE) for full details.\n\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements. See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership. The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License. You may obtain a copy of the License at\n\n\u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n\n### Contributors\n\n[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]\u003cbr/\u003e[James Woolfenden][jameswoolfenden_homepage]\n\n[jameswoolfenden_homepage]: https://github.com/jameswoolfenden\n[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswoolfenden%2Fterraform-gcp-cloudfunction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameswoolfenden%2Fterraform-gcp-cloudfunction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameswoolfenden%2Fterraform-gcp-cloudfunction/lists"}