{"id":26718637,"url":"https://github.com/helmless/google-cloudrun-service-terraform-module","last_synced_at":"2025-03-27T17:35:35.427Z","repository":{"id":263627660,"uuid":"890930738","full_name":"helmless/google-cloudrun-service-terraform-module","owner":"helmless","description":"A Terraform wrapper module that provides a shell around a Google Cloud Run Service or Job which is deployed using Helmless.","archived":false,"fork":false,"pushed_at":"2025-03-26T18:38:26.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T19:32:29.439Z","etag":null,"topics":["cloudrun","google","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helmless.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-11-19T12:38:50.000Z","updated_at":"2025-03-26T18:38:13.000Z","dependencies_parsed_at":"2024-11-19T15:45:51.165Z","dependency_job_id":"1e0223e7-bd39-4c5a-a581-f814ff97b9f4","html_url":"https://github.com/helmless/google-cloudrun-service-terraform-module","commit_stats":null,"previous_names":["helmless/google-cloudrun-service-terraform-module"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmless%2Fgoogle-cloudrun-service-terraform-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmless%2Fgoogle-cloudrun-service-terraform-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmless%2Fgoogle-cloudrun-service-terraform-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helmless%2Fgoogle-cloudrun-service-terraform-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helmless","download_url":"https://codeload.github.com/helmless/google-cloudrun-service-terraform-module/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245893215,"owners_count":20689627,"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":["cloudrun","google","terraform-module"],"created_at":"2025-03-27T17:35:34.892Z","updated_at":"2025-03-27T17:35:35.420Z","avatar_url":"https://github.com/helmless.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# helmless/google-cloudrun-terraform-module\n\nA [Terraform][terraform] module to create a wrapper around a Google Cloud Run Service or Job. The Cloud Run workload will be deployed using [Helmless](https://helmless.io) instead of Terraform. The module purely exists to have a reference to the cloud resource in order to apply IAM policies to it.\n\n[goolge-cloud]: https://cloud.google.com\n[terraform]: https://www.terraform.io\n\n# asdf tools\n\nThis repository has a _.tools-versions_ file used by [asdf](https://asdf-vm.com/) to install the necessary tools. For this you need the following additional plugins:\n\n```\nasdf plugin add terraform-docs https://github.com/looztra/asdf-terraform-docs\nasdf plugin add tflint https://github.com/skyzyx/asdf-tflint\nasdf install\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n\n\n## Usage\n\n```hcl\nmodule \"github_federation\" {\n  source              = \"github.com/helmless/google-workload-identity-federation-terraform-module?ref=v0.1.0\"\n  id                  = \"github\"\n  github_organization = \"helmless\"\n}\n\nmodule \"cloudrun_service\" {\n  # source = \"github.com/helmless/google-cloudrun-service-terraform-module?ref=v0.1.2\" # x-release-please-version\n  source = \"../\"\n  name   = \"example-service\"\n\n  create_service_account = true\n  deployment_accounts    = [\"${module.github_federation.repository_principal_set_id_prefix}/example-repository\"]\n}\n```\n\n## Required Inputs\n\nThe following input variables are required:\n\n### \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name)\n\nDescription: The name of the Cloud Run service. Must be unique within the project and region.\n\nType: `string`\n\n## Optional Inputs\n\nThe following input variables are optional (have default values):\n\n### \u003ca name=\"input_create_service_account\"\u003e\u003c/a\u003e [create\\_service\\_account](#input\\_create\\_service\\_account)\n\nDescription: Whether to create a service account for the Cloud Run service with the same name as the service. If not provided, the default service account will be used.\n\nType: `bool`\n\nDefault: `true`\n\n### \u003ca name=\"input_deletion_protection\"\u003e\u003c/a\u003e [deletion\\_protection](#input\\_deletion\\_protection)\n\nDescription: Whether to enable deletion protection for the Cloud Run service.\n\nType: `bool`\n\nDefault: `true`\n\n### \u003ca name=\"input_deployment_accounts\"\u003e\u003c/a\u003e [deployment\\_accounts](#input\\_deployment\\_accounts)\n\nDescription: A list of accounts that are allowed to deploy the Cloud Run service. Must be in the format of 'serviceAccount:ACCOUNT\\_EMAIL' or principalSet:PRINCIPAL\\_SET\\_ID. The accounts will get the roles/run.admin role on the Cloud Run service and the roles/iam.workloadIdentityUser role on the service account.\n\nType: `list(string)`\n\nDefault: `[]`\n\n### \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description)\n\nDescription: An optional description of the Cloud Run service.\n\nType: `string`\n\nDefault: `\"\"`\n\n### \u003ca name=\"input_iam\"\u003e\u003c/a\u003e [iam](#input\\_iam)\n\nDescription: A list of IAM bindings to apply to the Cloud Run service.\n\nType:\n\n```hcl\nlist(object({\n    role    = string\n    members = list(string)\n  }))\n```\n\nDefault: `[]`\n\n### \u003ca name=\"input_labels\"\u003e\u003c/a\u003e [labels](#input\\_labels)\n\nDescription: Labels to apply to the Cloud Run service.\n\nType: `map(string)`\n\nDefault: `{}`\n\n### \u003ca name=\"input_project\"\u003e\u003c/a\u003e [project](#input\\_project)\n\nDescription: The project to deploy the Cloud Run service to.\n\nType: `string`\n\nDefault: `null`\n\n### \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region)\n\nDescription: The region to deploy the Cloud Run service to.\n\nType: `string`\n\nDefault: `\"us-central1\"`\n\n### \u003ca name=\"input_service_account_email\"\u003e\u003c/a\u003e [service\\_account\\_email](#input\\_service\\_account\\_email)\n\nDescription: The service account email to use for the Cloud Run service. If not provided, the default service account will be used.\n\nType: `string`\n\nDefault: `null`\n\n## Outputs\n\nThe following outputs are exported:\n\n### \u003ca name=\"output_cloud_run_service\"\u003e\u003c/a\u003e [cloud\\_run\\_service](#output\\_cloud\\_run\\_service)\n\nDescription: The full Cloud Run service object and all attributes.\n\n### \u003ca name=\"output_service_account\"\u003e\u003c/a\u003e [service\\_account](#output\\_service\\_account)\n\nDescription: The service account used by the Cloud Run service. Uses the provided service account if create\\_service\\_account is false, otherwise creates a new service account.\n\n## Requirements\n\nThe following requirements are needed by this module:\n\n- \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) (\u003e= 1.9.6, \u003c 2)\n\n- \u003ca name=\"requirement_google\"\u003e\u003c/a\u003e [google](#requirement\\_google) (\u003e= 5.0)\n\n## Providers\n\nThe following providers are used by this module:\n\n- \u003ca name=\"provider_google\"\u003e\u003c/a\u003e [google](#provider\\_google) (6.27.0)\n\n## Modules\n\nNo modules.\n\n## Resources\n\nThe following resources are used by this module:\n\n- [google_cloud_run_v2_service.cloud_run_service](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service) (resource)\n- [google_cloud_run_v2_service_iam_binding.custom_iam](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service_iam_binding) (resource)\n- [google_cloud_run_v2_service_iam_member.run_admin](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service_iam_member) (resource)\n- [google_service_account.cloud_run_service_account](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) (resource)\n- [google_service_account_iam_member.service_account_user](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account_iam_member) (resource)\n- [google_project.current](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project) (data source)\n- [google_service_account.cloud_run_service_account](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/service_account) (data source)\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmless%2Fgoogle-cloudrun-service-terraform-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelmless%2Fgoogle-cloudrun-service-terraform-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelmless%2Fgoogle-cloudrun-service-terraform-module/lists"}