{"id":24503666,"url":"https://github.com/plus3it/terraform-aws-slack-notifier","last_synced_at":"2026-01-03T01:05:03.258Z","repository":{"id":49716402,"uuid":"148669636","full_name":"plus3it/terraform-aws-slack-notifier","owner":"plus3it","description":"Terraform module that builds and deploys a lamdbda function for the aws-to-slack package.","archived":false,"fork":false,"pushed_at":"2025-02-20T03:49:30.000Z","size":1504,"stargazers_count":4,"open_issues_count":2,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-20T04:29:32.070Z","etag":null,"topics":[],"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/plus3it.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":"2018-09-13T16:56:18.000Z","updated_at":"2025-02-20T03:49:32.000Z","dependencies_parsed_at":"2025-01-08T00:31:44.415Z","dependency_job_id":"730320d9-b576-491b-abb7-656591e7623e","html_url":"https://github.com/plus3it/terraform-aws-slack-notifier","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Fterraform-aws-slack-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Fterraform-aws-slack-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Fterraform-aws-slack-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plus3it%2Fterraform-aws-slack-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plus3it","download_url":"https://codeload.github.com/plus3it/terraform-aws-slack-notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243703969,"owners_count":20334082,"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":[],"created_at":"2025-01-21T23:18:00.773Z","updated_at":"2026-01-03T01:05:03.253Z","avatar_url":"https://github.com/plus3it.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pullreminders](https://pullreminders.com/badge.svg)](https://pullreminders.com?ref=badge)\n\n# terraform-aws-slack-notifier\n\nTerraform module that builds and deploys a lamdbda function for the\n[`aws-to-slack`][aws-to-slack] package.\n\n[aws-to-slack]: https://github.com/arabold/aws-to-slack\n\n## Usage\n\nThis module supports a couple use cases:\n\n* Create the `aws-to-slack` lambda function\n* Create triggers for the lambda function\n\n### Just the aws-to-slack Lambda Function\n\nTo create just the lambda function, use only the variable `hook_url`.\n\n```hcl\nmodule \"aws-to-slack\" {\n  source = \"git::https://github.com/plus3it/terraform-aws-slack-notifier.git\"\n\n  hook_url = \"https://hooks.slack.com/services/your/hook/id\"\n}\n```\n\n### Trigger Notifications from CloudWatch Event Rules\n\nTo trigger notifications from CloudWatch Event Rules, use the variable\n`event_rules`. This will create the `aws-to-slack` lambda function, the\nspecified event rule(s), and the trigger, and it will add the necessary\npermissions to the lambda function. See the section [Details for `event_rules`](#details-for-event_rules).\n\n```hcl\nmodule \"aws-to-slack\" {\n  source = \"git::https://github.com/plus3it/terraform-aws-slack-notifier.git\"\n\n  hook_url = \"https://hooks.slack.com/services/your/hook/id\"\n\n  event_rules = [\n    {\n      pattern = \u003c\u003c-PATTERN\n        {\n          \"detail-type\": [\"CodeBuild Build State Change\"]\n          \"source\": [\"aws.codebuild\"]\n        }\n        PATTERN\n    }\n  ]\n}\n```\n\n## Variables\n\n| Name | Description | Type | Default |\n|------|-------------|:----:|:-------:|\n| `hook_url` | Slack webhook URL; see \u003chttps://api.slack.com/incoming-webhooks\u003e | string | - |\n| `name` | (Optional) Name to associate with the lambda function | string | `\"aws-to-slack\"` |\n| `event_rules` | (Optional) List of config maps of CloudWatch Event Rules that will trigger notifications | string | `[]` |\n| `sns_trigger` | (Optional) Toggle to control whether to create an SNS topic and subscription for the lambda function | bool | `false` |\n\n### Details for `event_rules`\n\nThe `event_rules` variable is a list of config maps. Each map describes an\nevent rule that will be created. The supported structure is depicted below.\nOnly the `pattern` key is required. More information on the supported JSON\nfor the pattern is available in the [Amazon CloudWatch Events documentation][cloudwatch-docs].\n\n[cloudwatch-docs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html\n\n```hcl\n  event_rules = [\n    {\n      name        = \"\"  // Optional. Name for the CloudWatch Event rule. Defaults to var.name_\u003cindex\u003e\n      description = \"\"  // Optional. Description for the CloudWatch Event rule. Defaults to \"Managed by Terraform\"\n      pattern     = \"\"  // Required. JSON object describing events the rule will match.\n    }\n  ]\n```\n\n## Authors\n\nThis module is maintained by [Plus3 IT Systems](https://github.com/plus3it).\n\n## License\n\nApache 2 licensed. See the [LICENSE.md](LICENSE.md) file for details.\n\n\u003c!-- BEGIN TFDOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.12 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | n/a |\n\n## Resources\n\n| Name | Type |\n|------|------|\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_hook_url\"\u003e\u003c/a\u003e [hook\\_url](#input\\_hook\\_url) | Slack webhook URL; see \u003chttps://api.slack.com/incoming-webhooks\u003e | `string` | n/a | yes |\n| \u003ca name=\"input_create_sns_topic\"\u003e\u003c/a\u003e [create\\_sns\\_topic](#input\\_create\\_sns\\_topic) | (Optional) Creates an SNS topic and subscribes the lambda function; conflicts with `sns_topics` | `bool` | `false` | no |\n| \u003ca name=\"input_event_rules\"\u003e\u003c/a\u003e [event\\_rules](#input\\_event\\_rules) | (Optional) List of config maps of CloudWatch Event Rules that will trigger notifications | `list(map(string))` | `[]` | no |\n| \u003ca name=\"input_lambda\"\u003e\u003c/a\u003e [lambda](#input\\_lambda) | Object of optional attributes passed on to the lambda module | \u003cpre\u003eobject({\u003cbr/\u003e    artifacts_dir            = optional(string, \"builds\")\u003cbr/\u003e    build_in_docker          = optional(bool, false)\u003cbr/\u003e    create_package           = optional(bool, true)\u003cbr/\u003e    ephemeral_storage_size   = optional(number)\u003cbr/\u003e    ignore_source_code_hash  = optional(bool, true)\u003cbr/\u003e    local_existing_package   = optional(string)\u003cbr/\u003e    memory_size              = optional(number, 128)\u003cbr/\u003e    recreate_missing_package = optional(bool, false)\u003cbr/\u003e    runtime                  = optional(string, \"nodejs22.x\")\u003cbr/\u003e    s3_bucket                = optional(string)\u003cbr/\u003e    s3_existing_package      = optional(map(string))\u003cbr/\u003e    s3_prefix                = optional(string)\u003cbr/\u003e    store_on_s3              = optional(bool, false)\u003cbr/\u003e    timeout                  = optional(number, 300)\u003cbr/\u003e  })\u003c/pre\u003e | `{}` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | (Optional) Name to associate with the lambda function | `string` | `\"aws-to-slack\"` | no |\n| \u003ca name=\"input_sns_topics\"\u003e\u003c/a\u003e [sns\\_topics](#input\\_sns\\_topics) | (Optional) List of SNS ARNs the lambda function will be subscribed to; conflicts with `create_sns_topic` | `list(string)` | `[]` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_events_rule_arns\"\u003e\u003c/a\u003e [events\\_rule\\_arns](#output\\_events\\_rule\\_arns) | ARNs of the CloudWatch Event Rules |\n| \u003ca name=\"output_function_arn\"\u003e\u003c/a\u003e [function\\_arn](#output\\_function\\_arn) | The ARN of the Lambda function |\n| \u003ca name=\"output_function_name\"\u003e\u003c/a\u003e [function\\_name](#output\\_function\\_name) | The name of the Lambda function |\n| \u003ca name=\"output_role_arn\"\u003e\u003c/a\u003e [role\\_arn](#output\\_role\\_arn) | The ARN of the IAM role created for the Lambda function |\n| \u003ca name=\"output_role_name\"\u003e\u003c/a\u003e [role\\_name](#output\\_role\\_name) | The name of the IAM role created for the Lambda function |\n| \u003ca name=\"output_sns_topic_arn\"\u003e\u003c/a\u003e [sns\\_topic\\_arn](#output\\_sns\\_topic\\_arn) | ARN of the SNS Topic |\n| \u003ca name=\"output_sns_topic_subscription_arns\"\u003e\u003c/a\u003e [sns\\_topic\\_subscription\\_arns](#output\\_sns\\_topic\\_subscription\\_arns) | ARN of the SNS Topic Subscription |\n\n\u003c!-- END TFDOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus3it%2Fterraform-aws-slack-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplus3it%2Fterraform-aws-slack-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplus3it%2Fterraform-aws-slack-notifier/lists"}