Skip to content

Commit 31f7f61

Browse files
authored
only provision notification channels if provided (#375)
1 parent 54e5100 commit 31f7f61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

terraform/notification.tf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
resource "google_monitoring_notification_channel" "non_paging" {
2-
for_each = var.alert_notification_channel_non_paging
2+
for_each = {
3+
for k, v in var.alert_notification_channel_non_paging : k => v
4+
if k == "email" && try(v.labels.email_address, "") != ""
5+
}
36

47
project = var.project_id
58

0 commit comments

Comments
 (0)