Skip to content

Commit 1e81cd3

Browse files
committed
fix: the format for email notifications were incorrect
1 parent f579d87 commit 1e81cd3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

locals.tf

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
locals {
33
## Indicates if slack notifications are enabled
44
enable_slack = var.notifications.slack != null ? true : false
5+
## Indicates if email notifications are enabled
6+
enable_email = var.notifications.email != null ? true : false
7+
8+
## The configuration for email notifications if enabled
9+
email = local.enable_email ? {
10+
addresses = var.notifications.email.addresses
11+
} : null
512

613
## The configuration for slack notifications if enabled
714
slack = local.enable_slack ? {

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module "notifications" {
66

77
allowed_aws_services = ["budgets.amazonaws.com", "lambda.amazonaws.com"]
88
create_sns_topic = var.create_sns_topic
9-
email = try(var.notifications.email.addresses, [])
9+
email = local.email
1010
slack = local.slack
1111
sns_topic_name = var.sns_topic_name
1212
tags = var.tags

0 commit comments

Comments
 (0)