Lupus-Metallum / terraform-aws-python-slack-notifications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraform-aws-python-slack-notifications

A Terraform module for deploying and managing a Python (3.7) lambda function to send SNS messages to a Slack channel via Webhook.

Getting Started

Most basic usage:

module "terraform-aws-python-slack-notifications" {
  source  = "Lupus-Metallum/python-slack-notifications/aws"
  version = "0.9.0"

  name               = "slack-alerter"
  webhook_secret_arn = "arn:aws:secretsmanager:region:000000000000:secret:secret-id"
  slack_channel      = "aws-alerts"
  slack_emoji_icon   = ":ghost"
}

Providers

Name Version
archive n/a
aws n/a

Resources

Name Type
aws_iam_policy.this resource
aws_iam_role.this resource
aws_iam_role_policy_attachment.this resource
aws_iam_role_policy_attachment.this_basic resource
aws_iam_role_policy_attachment.this_insights resource
aws_iam_role_policy_attachment.this_sns resource
aws_iam_role_policy_attachment.this_vpc resource
aws_iam_role_policy_attachment.this_xray resource
aws_kms_alias.this resource
aws_kms_key.this resource
aws_lambda_function.this resource
aws_lambda_permission.this resource
aws_sns_topic.this resource
aws_sns_topic_subscription.this resource
archive_file.this data source
aws_iam_policy_document.this data source
aws_iam_policy_document.this_assume data source
aws_secretsmanager_secret.this data source

Inputs

Name Description Type Default Required
slack_channel The name slack channel to send alerts to string n/a yes
webhook_secret_arn The arn of the AWS Secret containing the slack webhook url string n/a yes
kms_key_description description of what the key is used for string "kms key created by slack alerter to encrypt resources" no
lambda_tracing Should we enable lambda tracing? bool false no
name The name to use for resources created by this module string "Slack-Alerter" no
security_group_ids ids of the security groups to be used by the lambda function list(string) [] no
slack_emoji_icon The emoji to use in slack messages string ":ghost" no
slack_message_header The message header to send string "slack_message_header" no
sns_encryption Should we encrypt the SNS topic with a new KMS key? bool false no
subnet_ids subnet ids for the lambda function list(string) [] no
tags Tags to apply to resources created by this module map {} no

About

License:Apache License 2.0


Languages

Language:HCL 75.7%Language:Python 24.3%