Git Product home page Git Product logo

terraform-aws-sns-lambda-notify-slack's People

Contributors

actions-user avatar aknysh avatar boris-dyga-sm avatar cloudpossebot avatar dylanbannon avatar gowiem avatar max-lobur avatar nitrocode avatar osterman avatar renovate[bot] avatar sarkis avatar vadim-hleif avatar vladsmrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-aws-sns-lambda-notify-slack's Issues

hashicorp/template does not have a darwin_arm64 release and is archived

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Attempting to leverage cloudposse/terraform-aws-budgets which pulls in this module. This module attempts to fetch hashicorp/template. The version 2.2.0 has been archived and recommends switching to templatefile. https://registry.terraform.io/providers/hashicorp/template/2.2.0 The problem is that template does not have an OSX m1/m2 release so it fails with:

│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform,
│ darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other
│ versions of this provider may have different platforms supported.
╵

Expected Behavior

The module works on OSX m1/m2

Steps to Reproduce

Steps to reproduce the behavior:

  1. Attempt to use cloudposses/terraform-aws-budgets on OSX m1
  2. Run terrform init
  3. See error

Screenshots

N/A

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: OSX
  • Version 12.6
  • Architecture arm

Additional Context

N/A

Terraform 0.12 support?

Doesn't look like this module supports TF 0.12 yet - any thoughts on if that's something that will be added at some point?

problems with 0.30 release

Hi,
I get:

Warning: Quoted references are deprecated

on .terraform/modules/notify_slack.sns-lambda-notify-slack.notify_slack/main.tf line 107, in resource "aws_lambda_function" "notify_slack":
107: depends_on = ["aws_cloudwatch_log_group.lambda"]

In this context, references are expected literally rather than in quotes.
Terraform 0.11 and earlier required quotes, but quoted references are now
deprecated and will be removed in a future version of Terraform. Remove the
quotes surrounding this reference to silence this warning.

(no big deal)

but then more importantly:

Error: Unable to load ".terraform/modules/edf89c618c4d7dec91d040d492f2f1de/functions/notify_slack.zip": open .terraform/modules/edf89c618c4d7dec91d040d492f2f1de/functions/notify_slack.zip: no such file or directory

on .terraform/modules/notify_slack.sns-lambda-notify-slack.notify_slack/main.tf line 74, in resource "aws_lambda_function" "notify_slack":
74: resource "aws_lambda_function" "notify_slack" {

This after upgrading my codebase from 0.11.14 to 0.12.23, albeit I doubt that could be the culprit.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Detected dependencies

terraform
examples/complete/main.tf
examples/complete/versions.tf
  • aws >= 2.0
  • local >= 1.3
  • null >= 2.0
  • template >= 2.2
  • hashicorp/terraform >= 0.13.0
main.tf
  • cloudposse/label/null 0.25.0
  • terraform-aws-modules/notify-slack/aws 5.6
versions.tf
  • archive >=1.3
  • aws >= 2.0
  • local >= 1.3
  • null >= 2.0
  • template >= 2.2
  • hashicorp/terraform >= 0.13.0

  • Check this box to trigger a request for Renovate to run again on this repository

Add Example Usage

what

  • Add example invocation

why

  • We need this so we can soon enable automated continuous integration testing of module

Terraform 0.15.x and the "list" function was deprecated in Terraform v0.12 and is no longer available; use tolist()

Describe the Bug

Terraform 0.15.3 throws the following error:

│ Error: Error in function call
│ 
│   on .terraform/modules/notify_slack_east.notify_slack/main.tf line 28, in locals:
│   28:     resources = [replace("${element(concat(aws_cloudwatch_log_group.lambda[*].arn, list("")), 0)}:*", ":*:*", ":*")]
│ 
│ Call to function "list" failed: the "list" function was deprecated in Terraform v0.12 and is no longer available; use tolist([ ... ]) syntax to write a literal list.

code of the module

module "notify_slack_east" {
  source            = "git::https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack?ref=tags/0.5.3"
  namespace         = var.team
  create_sns_topic  = true
  sns_topic_name    = "${var.team}-slack-notifications-alarm-east"
  name              = "notifications-east"
  attributes        = ["alarm"]
  slack_webhook_url = var.client_alarms_slack_webhook_url
  slack_channel     = "alarm"
  slack_username    = module.notify_slack_username.id
  tags              = module.config.tags
  providers = {
    aws = aws.east
  }
}

Expected Behavior

Terraform to throw no errors and resources declared in the module created

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

  • OS: Fedora 34
  • Terraform 0.15.3
  • Module version: 0.5.3

Missing outputs

Hi, this module looks helpful to get slack notifications hooked up, however it's missing some outputs to make it easy to wire into other resources.

My current use case is configuring a cloudwatch event rule to feed into this SNS topic, however I don't have a way to get the SNS ARN out.

I'll probably look at creating the SNS topic outside of the module instead.

Support for a different aws region provider

Describe the Feature

My primary aws region is us-west-2, but cloudwatch billing alarm should be created only in us-east-1
It would be nice to define the region (via aws provider) where the resources should be created

provider "aws" {
  alias = "east"
  region = "us-east-1"
}

module "notify_slack_east" {
  provider          = aws.east
  source            = "git::https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack?ref=tags/0.5.0"
  namespace         = var.team
  create_sns_topic  = true
  sns_topic_name    = "${var.team}-slack-notifications"
  name              = "notifications"
  slack_webhook_url = var.slack_webhook_url
  slack_channel     = "alarm"
  slack_username    = module.notify_slack_userrname.id
}

A clear and concise description of what the bug is.

Expected Behavior

Proper resources to be created in proper aws region

Ability to create multiple SNS topics, each to a different slack channel

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

Ability to define multiple SNS topics, each sending to different slack channels. Problem when I do this with the current implementation on the second pass of the loop we get a log group duplicate error:

│ Error: creating CloudWatch Logs Log Group (/aws/lambda/XXX-YYYYYY-default): ResourceAlreadyExistsException: The specified log group already exists

│ with module.notify_slack["b"].module.notify_slack.aws_cloudwatch_log_group.lambda[0],
│ on .terraform/modules/notify_slack.notify_slack/main.tf line 46, in resource "aws_cloudwatch_log_group" "lambda":
│ 46: resource "aws_cloudwatch_log_group" "lambda" {

Expected Behavior

List or Map of SNS topic to slack channels in a for_each loop to work properly

Use Case

SNS Topics:

  • "slack-a" sns topic sends to slack channel "#a"
  • "slack-b" sns topic sends to slack channel "#b"

Describe Ideal Solution

A clear and concise description of what you want to happen. If you don't know, that's okay.
`
variable "slack_channel" {
description = "List of slack channels"
type = list
default = ["a", "b"]
}

module "notify_slack" {
for_each = toset(var.slack_channel)
source = "git::https://github.com/cloudposse/terraform-aws-sns-lambda-notify-slack?ref=tags/0.5.9"
namespace = var.account_name
name = "slack-${each.key}"
slack_channel = each.key
slack_webhook_url = var.slack_webhook_url
slack_username = var.slack_username
`

Alternatives Considered

Additional Context

This issue looks to be a problem with the underlying terraform-aws-modules/notify-slack/aws module

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.