Current version: v0.3.0
SNS topic and Lambda function for sending messages to MS Teams, AWS Chime or Slack
Works with AWS Chime, MS Teams or Slack. If the default lambda function (template file) is not suitable it can be replaced with a different function.
module "aws_chatops" {
source = "https://github.com/ruebroad/terraform-aws-chatops?ref=v0.3.0"
name = ""
webhook_url = ""
}
Specify the path to a template file when calling the module e.g.
template_file = file("${path.root}/files/slack.tpl")
For Slack, Teams and Chime it must include:
url = "${webhook_url}"
For Slack the message body must also include:
"channel": "${slack_channel}",
"username": "${slack_username}",
The "files" folder contains a modified version of the slack Lambda function template as there is some additional processing of the SNS event message required to be able to extract specific fields.
Language can also be changed to PowerShell, Node or whatever. In this case the runtime variable should be changed from the default of "python3.6"
No requirements.
Name | Version |
---|---|
archive | n/a |
aws | n/a |
local | n/a |
null | n/a |
template | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
chatops_app | Chatops app - Chime, Slack, Teams | string |
"teams" |
no |
cw_logs_retention_in_days | Cloudwatch log retention in days | number |
3 |
no |
memory_size | n/a | number |
128 |
no |
name | Name to apply to resources | any |
n/a | yes |
runtime | Lambda variables | string |
"python3.6" |
no |
slack_channel | Slack channel for notifications | string |
"" |
no |
slack_username | Slack webhook username | string |
"" |
no |
tags | Map of tags to apply | map |
n/a | no |
template_file | Path to alternative template file | string |
"" |
no |
timeout | n/a | number |
15 |
no |
tracing_config | Lambda X-Ray config - Active or Passive | string |
"Active" |
no |
webhook_url | Chatops app webhook url | any |
n/a | yes |
Name | Description |
---|---|
function_name | n/a |
invoke_arn | n/a |
sns_topic_arn | n/a |