Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
KamranBiglari authored Oct 27, 2023
1 parent ccde978 commit 1f2a83b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ variable "input" {
}

variable "loop" {
type = map(any)
type = any
default = {}
}

Expand All @@ -19,7 +19,7 @@ variable "current_environment" {
}

variable "template_data" {
type = map(any)
type = any
description = "values to replace in template"
default = {}
}
Expand Down Expand Up @@ -60,7 +60,7 @@ module "metric-alarm" {
namespace = can(each.value.Config.Query) ? null : each.value.Config.Namespace
metric_name = can(each.value.Config.Query) ? null : each.value.Config.Metrics
statistic = can(each.value.Config.Query) ? null : each.value.Config.Statistic
dimensions = can(each.value.Config.Query) ? null : try(tomap(each.value.Config.Dimensions), {})
dimensions = can(each.value.Config.Query) ? null : try({for dK,dV in try(each.value.Config.Dimensions,{}) : dV.Name => dV.Value},{})
period = can(each.value.Config.Query) ? null : each.value.Config.Period
metric_query = can(each.value.Config.Query) ? [for qK, qV in each.value.Config.Query : {
id = (can(qV.expression)) ? "e${qK}" : "m${qK}"
Expand Down

0 comments on commit 1f2a83b

Please sign in to comment.