-
-
Notifications
You must be signed in to change notification settings - Fork 347
Description
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:
After looking at this module code, I believe the issue is here:
terraform-aws-notify-slack/main.tf
Line 76 in 2e72539
endpoint = module.lambda.lambda_function_arn |
Instead of using the lambda_function_arn
output, the lambda_function_qualified_arn
1 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 tochannel-a
- Test notifications
- Update
slack_channel
value tochannel-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
...