Coder Social home page Coder Social logo

ruebroad / terraform-aws-chatops Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 66 KB

SNS topic and Lambda function for sending messages to MS Teams, AWS Chime or Slack

License: Apache License 2.0

HCL 69.99% Python 15.52% Shell 14.49%
slack ms-teams aws-chime terraform-module

terraform-aws-chatops's Introduction

Terraform Chatops Module

Current version: v0.3.0

CircleCI

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.

Usage

module "aws_chatops" {
  source = "https://github.com/ruebroad/terraform-aws-chatops?ref=v0.3.0"

  name = ""
  webhook_url = ""
}

Replacing the default Lambda function

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

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"

Requirements

No requirements.

Providers

Name Version
archive n/a
aws n/a
local n/a
null n/a
template n/a

Inputs

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

Outputs

Name Description
function_name n/a
invoke_arn n/a
sns_topic_arn n/a

terraform-aws-chatops's People

Contributors

ruebroad avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.