Skip to content

Commit

Permalink
fix: the format for email notifications were incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
gambol99 committed Apr 27, 2024
1 parent f579d87 commit 1e81cd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
locals {
## Indicates if slack notifications are enabled
enable_slack = var.notifications.slack != null ? true : false
## Indicates if email notifications are enabled
enable_email = var.notifications.email != null ? true : false

## The configuration for email notifications if enabled
email = local.enable_email ? {
addresses = var.notifications.email.addresses
} : null

## The configuration for slack notifications if enabled
slack = local.enable_slack ? {
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "notifications" {

allowed_aws_services = ["budgets.amazonaws.com", "lambda.amazonaws.com"]
create_sns_topic = var.create_sns_topic
email = try(var.notifications.email.addresses, [])
email = local.email
slack = local.slack
sns_topic_name = var.sns_topic_name
tags = var.tags
Expand Down

0 comments on commit 1e81cd3

Please sign in to comment.