sns-lambda-notify-slack

cloudposse/sns-lambda-notify-slack/aws

Terraform Module HCL AWS

Terraform module to provision a lambda function that subscribes to SNS and notifies to Slack.

Install
module "sns-lambda-notify-slack" {
source = "cloudposse/sns-lambda-notify-slack/aws"
version = "0.9.2"
}
plain text: /constructs/tfmod-cloudposse-sns-lambda-notify-slack-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision a lambda function that subscribes to SNS and notifies to Slack. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage ``hcl module "notify_slack" { source = "git::https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack?ref=tags/0.1.0" namespace = "eg" stage = "staging" name = "app" slack_webhook_url = "https://hooks.slack.com/services/AAAAAAAA/BBBBBBBB/CCCCCCC" slack_channel = "aws-services" slack_username = "reporter" } `` > [!IMPORTANT] > In Cloud Posse's examples, we avoid pinning m

Inputs (28)
NameTypeDescriptionDefault
slack_channelstringThe name of the channel in Slack for notifications required
slack_webhook_urlstringThe URL of Slack webhook required
slack_usernamestringThe username that will appear on Slack messages required
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
descriptor_formatsanyDescribe additional descriptors to be output in the `descriptors` output map. Ma{}
slack_emojistringA custom emoji that will appear on Slack messages":aws:"
vpc_security_group_idslist(string)List of security group ids when the notifying Lambda Function should run in the null
lambda_source_pathstringThe source path of the custom Lambda functionnull
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
sns_topic_namestringName of the SNS topic to subscribe to.""
vpc_subnet_idslist(string)List of subnet ids when the notifying Lambda Function should run in the VPC. Usunull
contextanySingle object for setting entire context at once. See description of individual { "additional_tag_map": {}, "attribu
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
create_sns_topicboolWhether to create new SNS topictrue
kms_key_arnstringARN of the KMS key used for decrypting slack webhook url""
enabledboolSet to false to prevent the module from creating any resourcesnull
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
Outputs (9)
notify_slack_lambda_function_version — Latest published version of your Lambda function
lambda_cloudwatch_log_group_arn — The Amazon Resource Name (ARN) specifying the log group
slack_topic_arn — The ARN of the SNS topic from which messages will be sent to Slack
lambda_iam_role_arn — The ARN of the IAM role used by Lambda function
lambda_iam_role_name — The name of the IAM role used by Lambda function
notify_slack_lambda_function_arn — The ARN of the Lambda function
notify_slack_lambda_function_invoke_arn — The ARN to be used for invoking Lambda function from API Gateway
notify_slack_lambda_function_name — The name of the Lambda function
notify_slack_lambda_function_last_modified — The date Lambda function was last modified
Details
FrameworkTerraform Module
LanguageHCL
Version0.9.2
Cloud AWS
★ Stars50
Forks43
Total downloads226.2k
Inputs28
Outputs9
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated