Skip to content

Commit

Permalink
Fix alert policy config module
Browse files Browse the repository at this point in the history
The way it is right now raises an "Inconsistent types" error if you have
more than one policy.
  • Loading branch information
diraol committed Sep 2, 2024
1 parent 671c38b commit 7ce204e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/config/alert_policies.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://docs.opsgenie.com/docs/alert-api

resource "opsgenie_alert_policy" "this" {
for_each = module.this.enabled ? { for policy in local.alert_policies : policy.name => policy } : {}
for_each = module.this.enabled ? { for policy in local.alert_policies : policy.name => policy } : tomap()

name = each.value.name
policy_description = try(each.value.policy_description, each.value.name)
Expand Down

0 comments on commit 7ce204e

Please sign in to comment.