Skip to content

Lambda version updates not reflected in triggerΒ #230

@fatmcgav

Description

@fatmcgav

Description

When attempting to update the slack_channel that a set of notifications target, I observed that the notifications were still being sent to the "old" channel.

Upon reviewing the AWS config, I could see a new version of the lambda had been published. However there was an error on the triggers section for the new lambda version as follows:
Screenshot 2024-08-28 at 09 56 06

After looking at this module code, I believe the issue is here:

endpoint = module.lambda.lambda_function_arn

Instead of using the lambda_function_arn output, the lambda_function_qualified_arn1 should be used, as that includes the "current" version.

Alternatively, an alias could be defined, using the alias submodule[2] and that alias is then referenced by the trigger.

[2] https://github.com/terraform-aws-modules/terraform-aws-lambda/tree/v3.2.0/modules/alias

  • βœ‹ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: ~> 6.0

  • Terraform version: 1.5.7

  • Provider version(s): 5.63.0

Reproduction Code [Required]

Steps to reproduce the behavior:

  • Deploy module with slack_channel set to channel-a
  • Test notifications
  • Update slack_channel value to channel-b
  • Test notifications

Expected behavior

Notifications should be sent to #channel-b

Actual behavior

Notification is still sent to #channel-a

Terminal Output Screenshot(s)

Additional context

The current terraform-aws-modules/lambda/aws version (3.2.0) is 3 years old!!!
The latest version is 7.8.1...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions