{"id":22196702,"url":"https://github.com/druids/terraform-module-aws-notify-slack","last_synced_at":"2026-01-31T13:08:09.681Z","repository":{"id":49166374,"uuid":"311311737","full_name":"druids/terraform-module-aws-notify-slack","owner":"druids","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-12T15:18:38.000Z","size":159,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T16:49:59.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/druids.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":"2020-11-09T11:06:49.000Z","updated_at":"2024-06-12T15:18:08.000Z","dependencies_parsed_at":"2024-06-12T21:16:21.199Z","dependency_job_id":"a7410aed-ab11-4245-bbb6-40a0c2b0e964","html_url":"https://github.com/druids/terraform-module-aws-notify-slack","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/druids/terraform-module-aws-notify-slack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fterraform-module-aws-notify-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fterraform-module-aws-notify-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fterraform-module-aws-notify-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fterraform-module-aws-notify-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druids","download_url":"https://codeload.github.com/druids/terraform-module-aws-notify-slack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druids%2Fterraform-module-aws-notify-slack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28943989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-12-02T14:16:11.746Z","updated_at":"2026-01-31T13:08:09.660Z","avatar_url":"https://github.com/druids.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Notify Slack Terraform module\n\nThis module creates an SNS topic (or uses an existing one) and an AWS Lambda function that sends notifications to Slack using the [incoming webhooks API](https://api.slack.com/incoming-webhooks).\n\nStart by setting up an [incoming webhook integration](https://my.slack.com/services/new/incoming-webhook/) in your Slack workspace.\n\nDoing serverless with Terraform? Check out [serverless.tf framework](https://serverless.tf), which aims to simplify all operations when working with the serverless in Terraform.\n\n\n## Terraform versions\n\nTerraform 0.13. Pin module version to `~\u003e v4.0`. Submit pull-requests to `master` branch.\n\nTerraform 0.12. Pin module version to `3.5.0` (or older). Submit pull-requests to `terraform012` branch.\n\nTerraform 0.11. Pin module version to `~\u003e v1.0`.\n\n## Features\n\n- [x] AWS Lambda runtime Python 3.8\n- [x] Create new SNS topic or use existing one\n- [x] Support plaintext and encrypted version of Slack webhook URL\n- [x] Most of Slack message options are customizable\n- [x] Support different types of SNS messages:\n  - [x] AWS CloudWatch Alarms\n  - [x] AWS CloudWatch LogMetrics Alarms\n  - [ ] [Send pull-request to add support of other message types](https://github.com/terraform-aws-modules/terraform-aws-notify-slack/pulls)\n- [x] Local pytest driven testing of the lambda to a Slack sandbox channel\n\n## Usage\n\n```hcl\nmodule \"notify_slack\" {\n  source  = \"terraform-aws-modules/notify-slack/aws\"\n  version = \"~\u003e 4.0\"\n\n  sns_topic_name = \"slack-topic\"\n\n  slack_webhook_url = \"https://hooks.slack.com/services/AAA/BBB/CCC\"\n  slack_channel     = \"aws-notification\"\n  slack_username    = \"reporter\"\n}\n```\n\n## Upgrade from 2.0 to 3.0\n\nVersion 3 uses [Terraform AWS Lambda module](https://github.com/terraform-aws-modules/terraform-aws-lambda) to handle most of heavy-lifting related to Lambda packaging, roles, and permissions, while maintaining the same interface for the user of this module after many of resources will be recreated.\n\n## Using with Terraform Cloud Agents\n\n[Terraform Cloud Agents](https://www.terraform.io/docs/cloud/workspaces/agent.html) are a paid feature, available as part of the Terraform Cloud for Business upgrade package.\n\nThis module requires Python 3.8. You can customize [tfc-agent](https://hub.docker.com/r/hashicorp/tfc-agent) to include Python using this sample `Dockerfile`:\n\n```\nFROM hashicorp/tfc-agent:latest\nRUN apt-get -y update \u0026\u0026 apt-get -y install python3.8 python3-pip\nENTRYPOINT [\"/bin/tfc-agent\"]\n```\n\n## Use existing SNS topic or create new\n\nIf you want to subscribe the AWS Lambda Function created by this module to an existing SNS topic you should specify `create_sns_topic = false` as an argument and specify the name of existing SNS topic name in `sns_topic_name`.\n\n## Examples\n\n* [notify-slack-simple](https://github.com/terraform-aws-modules/terraform-aws-notify-slack/tree/master/examples/notify-slack-simple) - Creates SNS topic which sends messages to Slack channel.\n* [cloudwatch-alerts-to-slack](https://github.com/terraform-aws-modules/terraform-aws-notify-slack/tree/master/examples/cloudwatch-alerts-to-slack) - End to end example which shows how to send AWS Cloudwatch alerts to Slack channel and use KMS to encrypt webhook URL.\n\n## Testing with pytest\n\nTo run the tests:\n\n1. Set up a dedicated slack channel as a test sandbox with it's own webhook. See [Slack Incoming Webhooks docs](https://api.slack.com/messaging/webhooks) for details.\n2. Make a copy of the sample pytest configuration and edit as needed.\n\n        cp functions/pytest.ini.sample functions/pytest.ini\n\n3. Run the tests:\n\n        pytest functions/notify_slack_test.py\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 0.13.0 |\n| aws | \u003e= 2.35 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| aws | \u003e= 2.35 |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| cloudwatch\\_log\\_group\\_kms\\_key\\_id | The ARN of the KMS Key to use when encrypting log data for Lambda | `string` | `null` | no |\n| cloudwatch\\_log\\_group\\_retention\\_in\\_days | Specifies the number of days you want to retain log events in log group for Lambda. | `number` | `0` | no |\n| cloudwatch\\_log\\_group\\_tags | Additional tags for the Cloudwatch log group | `map(string)` | `{}` | no |\n| create | Whether to create all resources | `bool` | `true` | no |\n| create\\_sns\\_topic | Whether to create new SNS topic | `bool` | `true` | no |\n| iam\\_role\\_boundary\\_policy\\_arn | The ARN of the policy that is used to set the permissions boundary for the role | `string` | `null` | no |\n| iam\\_role\\_name\\_prefix | A unique role name beginning with the specified prefix | `string` | `\"lambda\"` | no |\n| iam\\_role\\_tags | Additional tags for the IAM role | `map(string)` | `{}` | no |\n| kms\\_key\\_arn | ARN of the KMS key used for decrypting slack webhook url | `string` | `\"\"` | no |\n| lambda\\_description | The description of the Lambda function | `string` | `null` | no |\n| lambda\\_function\\_name | The name of the Lambda function to create | `string` | `\"notify_slack\"` | no |\n| lambda\\_function\\_tags | Additional tags for the Lambda function | `map(string)` | `{}` | no |\n| lambda\\_role | IAM role attached to the Lambda Function.  If this is set then a role will not be created for you. | `string` | `\"\"` | no |\n| lambda\\_runtime | Lambda Function runtime | `string` | `python3.11` | no |\n| log\\_events | Boolean flag to enabled/disable logging of incoming events | `bool` | `false` | no |\n| reserved\\_concurrent\\_executions | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | `number` | `-1` | no |\n| slack\\_channel | The name of the channel in Slack for notifications | `string` | n/a | yes |\n| slack\\_emoji | A custom emoji that will appear on Slack messages | `string` | `\":aws:\"` | no |\n| slack\\_username | The username that will appear on Slack messages | `string` | n/a | yes |\n| slack\\_webhook\\_url | The URL of Slack webhook | `string` | n/a | yes |\n| sns\\_topic\\_kms\\_key\\_id | ARN of the KMS key used for enabling SSE on the topic | `string` | `\"\"` | no |\n| sns\\_topic\\_name | The name of the SNS topic to create | `string` | n/a | yes |\n| sns\\_topic\\_tags | Additional tags for the SNS topic | `map(string)` | `{}` | no |\n| subscription\\_filter\\_policy | (Optional) A valid filter policy that will be used in the subscription to filter messages seen by the target resource. | `string` | `null` | no |\n| tags | A map of tags to add to all resources | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| lambda\\_cloudwatch\\_log\\_group\\_arn | The Amazon Resource Name (ARN) specifying the log group |\n| lambda\\_iam\\_role\\_arn | The ARN of the IAM role used by Lambda function |\n| lambda\\_iam\\_role\\_name | The name of the IAM role used by Lambda function |\n| notify\\_slack\\_lambda\\_function\\_arn | The ARN of the Lambda function |\n| notify\\_slack\\_lambda\\_function\\_invoke\\_arn | The ARN to be used for invoking Lambda function from API Gateway |\n| notify\\_slack\\_lambda\\_function\\_last\\_modified | The date Lambda function was last modified |\n| notify\\_slack\\_lambda\\_function\\_name | The name of the Lambda function |\n| notify\\_slack\\_lambda\\_function\\_version | Latest published version of your Lambda function |\n| this\\_slack\\_topic\\_arn | The ARN of the SNS topic from which messages will be sent to Slack |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## Authors\n\nModule managed by [Anton Babenko](https://github.com/antonbabenko).\n\n## License\n\nApache 2 Licensed. See LICENSE for full details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fterraform-module-aws-notify-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruids%2Fterraform-module-aws-notify-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruids%2Fterraform-module-aws-notify-slack/lists"}