Skip to content

Commit

Permalink
fix: 🐛 fix ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
Clete2 committed Jul 13, 2023
1 parent 55920cf commit e0f2f45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tf-alarm-topic.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
enable_alarms = var.alarm_configuration != null
enable_alarms = var.alarm_configuration != null
create_sns_topic = local.enable_alarms && can([var.alarm_configuration.email_notification_list])
sns_topic_arn = local.create_sns_topic ? aws_sns_topic.alarms[0].arn : var.alarm_configuration.sns_topic_arn
sns_topic_arn = local.enable_alarms ? local.create_sns_topic ? aws_sns_topic.alarms[0].arn : var.alarm_configuration.sns_topic_arn : ""
}

resource "aws_sns_topic" "alarms" {
Expand Down

0 comments on commit e0f2f45

Please sign in to comment.