{"id":29273686,"url":"https://github.com/simplifi/terraform-google-cloud-build-slack-notifier","last_synced_at":"2025-07-05T02:36:35.010Z","repository":{"id":48673262,"uuid":"376109101","full_name":"simplifi/terraform-google-cloud-build-slack-notifier","owner":"simplifi","description":"Terraform Module to add Slack notifications to Cloud Build","archived":false,"fork":false,"pushed_at":"2025-03-31T15:25:42.000Z","size":23,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-03-31T16:56:04.774Z","etag":null,"topics":["cloudbuild","gcp","slack","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/simplifi/cloud-build-slack-notifier/google","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/simplifi.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}},"created_at":"2021-06-11T18:17:54.000Z","updated_at":"2025-03-31T15:25:47.000Z","dependencies_parsed_at":"2024-04-22T13:44:29.124Z","dependency_job_id":"f5858505-1a0c-43a2-9174-1ade9b233530","html_url":"https://github.com/simplifi/terraform-google-cloud-build-slack-notifier","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/simplifi/terraform-google-cloud-build-slack-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplifi%2Fterraform-google-cloud-build-slack-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplifi%2Fterraform-google-cloud-build-slack-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplifi%2Fterraform-google-cloud-build-slack-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplifi%2Fterraform-google-cloud-build-slack-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplifi","download_url":"https://codeload.github.com/simplifi/terraform-google-cloud-build-slack-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplifi%2Fterraform-google-cloud-build-slack-notifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263671879,"owners_count":23494056,"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":["cloudbuild","gcp","slack","terraform","terraform-module"],"created_at":"2025-07-05T02:36:34.385Z","updated_at":"2025-07-05T02:36:35.000Z","avatar_url":"https://github.com/simplifi.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-google-cloud-build-slack-notifier\n\n[![Build Status](https://www.travis-ci.com/simplifi/terraform-google-cloud-build-slack-notifier.svg?token=Tyt37RU5xWf1sPRSJyoD\u0026branch=main)](https://www.travis-ci.com/simplifi/terraform-google-cloud-build-slack-notifier)\n\nA Terraform module to enable Slack notifications for Cloud Build events.\n\n**Note - This will add the following resources to your project:**\n\n- Google Cloud Storage Bucket for storing the notifier configuration\n- Google Pub/Sub for events emitted from Cloud Build\n- Google Cloud Run for processing the events emitted from Cloud Build\n\nThis module is based on the instructions found in GCP's [Configuring Slack notifications](https://cloud.google.com/build/docs/configuring-notifications/configure-slack) guide.\n\n## Setup\n\nYou will need a Slack app incoming webhook url stored in a Google Secret Manager\nsecret for this to work.\n\n- Create a [Slack app](https://api.slack.com/apps?new_app=1) for your desired Slack workspace.\n- Activate [incoming webhooks](https://api.slack.com/messaging/webhooks) to post messages from Cloud Build to Slack.\n- Create a new secret in Google Secret Manager and store the webhook url in it.\n\n## Pre-commit Hooks\n\n[Pre-commit](https://pre-commit.com/) hooks have been configured for this repo.\n\nThe enabled hooks check for a variety of common problems in Terraform code, and\nwill run any time you commit to your branch.\n\nPre-commit (and dependencies) can be installed by following the instructions\nfound here:\n\n- [Install `pre-commit`](https://pre-commit.com/#install)\n- [Install `terraform-docs`](https://github.com/terraform-docs/terraform-docs#installation)\n\nTo enable the hooks locally, run the following from the root of this repo:\n`pre-commit install`\n\nTo uninstall the hooks, run the following from the root of this repo:\n`pre-commit uninstall`\n\nTo skip running the hooks when you commit:\n`git commit -n` aka `git commit --no-verify`\n\n**Currently enabled plugins:**\n\n- [pre-commit-terraform](https://github.com/antonbabenko/pre-commit-terraform)\n  - `terraform_fmt`: Rewrites all Terraform configuration files to a canonical format\n  - `terraform_docs`: Inserts input and output documentation into `README.md`\n  - `terraform_validate`: Validates all Terraform configuration files\n- [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)\n  - `end-of-file-fixer`: Makes sure files end in a newline and only a newline\n  - `trailing-whitespace`: Trims trailing whitespace\n  - `check-merge-conflict`: Check for files that contain merge conflict strings\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.13 |\n| \u003ca name=\"requirement_google\"\u003e\u003c/a\u003e [google](#requirement\\_google) | \u003e= 3.20 |\n| \u003ca name=\"requirement_google-beta\"\u003e\u003c/a\u003e [google-beta](#requirement\\_google-beta) | \u003e= 3.30 |\n| \u003ca name=\"requirement_random\"\u003e\u003c/a\u003e [random](#requirement\\_random) | \u003e= 2.1 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [google-beta_google_cloud_run_service.cloud_build_notifier](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_cloud_run_service) | resource |\n| [google-beta_google_project_service_identity.pubsub](https://registry.terraform.io/providers/hashicorp/google-beta/latest/docs/resources/google_project_service_identity) | resource |\n| [google_project_iam_member.notifier_project_roles](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |\n| [google_project_iam_member.pubsub_invoker_roles](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |\n| [google_project_iam_member.pubsub_project_roles](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |\n| [google_project_service.apis](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |\n| [google_pubsub_subscription.cloud_builds](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription) | resource |\n| [google_pubsub_topic.cloud_builds](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic) | resource |\n| [google_secret_manager_secret_iam_member.notifier_secret_accessor](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/secret_manager_secret_iam_member) | resource |\n| [google_service_account.notifier](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |\n| [google_service_account.pubsub_invoker](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |\n| [google_storage_bucket.cloud_build_notifier](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket) | resource |\n| [google_storage_bucket_object.cloud_build_notifier_config](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |\n| [google_storage_bucket_object.slack_template](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket_object) | resource |\n| [random_id.cloud_build_notifier](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource |\n| [random_id.cloud_build_notifier_service](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource |\n| [google_secret_manager_secret_version.slack_webhook_url](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/secret_manager_secret_version) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default |\n|------|-------------|------|---------|\n| \u003ca name=\"input_cloud_build_event_filter\"\u003e\u003c/a\u003e [cloud\\_build\\_event\\_filter](#input\\_cloud\\_build\\_event\\_filter) | The CEL filter to apply to incoming Cloud Build events. | `string` | `\"build.substitutions['BRANCH_NAME'] == 'main' \u0026\u0026 build.status in [Build.Status.SUCCESS, Build.Status.FAILURE, Build.Status.TIMEOUT]\"` |\n| \u003ca name=\"input_cloud_build_notifier_image\"\u003e\u003c/a\u003e [cloud\\_build\\_notifier\\_image](#input\\_cloud\\_build\\_notifier\\_image) | The image to use for the notifier. | `string` | `\"us-east1-docker.pkg.dev/gcb-release/cloud-build-notifiers/slack:latest\"` |\n| \u003ca name=\"input_disable_services_on_destroy\"\u003e\u003c/a\u003e [disable\\_services\\_on\\_destroy](#input\\_disable\\_services\\_on\\_destroy) | If true, the service APIs used will be disabled on destroy. | `bool` | `false` |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | The name to use on all resources created. | `string` | n/a |\n| \u003ca name=\"input_override_slack_template_json\"\u003e\u003c/a\u003e [override\\_slack\\_template\\_json](#input\\_override\\_slack\\_template\\_json) | Custom template to use for the Slack notifications, which overrides the default. | `string` | `\"\"` |\n| \u003ca name=\"input_project_id\"\u003e\u003c/a\u003e [project\\_id](#input\\_project\\_id) | Project ID of the project in which Cloud Build is running. | `string` | n/a |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | The region in which to deploy the notifier service. | `string` | `\"us-central1\"` |\n| \u003ca name=\"input_slack_webhook_url_secret_id\"\u003e\u003c/a\u003e [slack\\_webhook\\_url\\_secret\\_id](#input\\_slack\\_webhook\\_url\\_secret\\_id) | The ID of an existing Google Secret Manager secret, containing a Slack webhook URL. This is usually the `id` from the output of a `google_secret_manager_secret` resource. | `string` | n/a |\n| \u003ca name=\"input_slack_webhook_url_secret_project\"\u003e\u003c/a\u003e [slack\\_webhook\\_url\\_secret\\_project](#input\\_slack\\_webhook\\_url\\_secret\\_project) | The project ID containing the slack\\_webhook\\_url\\_secret\\_id. | `string` | n/a |\n\n## Outputs\n\nNo outputs.\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplifi%2Fterraform-google-cloud-build-slack-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplifi%2Fterraform-google-cloud-build-slack-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplifi%2Fterraform-google-cloud-build-slack-notifier/lists"}