Skip to content

Commit

Permalink
fix: budget
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-FFFFFF committed Apr 26, 2024
1 parent 661352a commit 2bcd766
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/budget/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ variable "budget_notifications" {
operator = string
threshold = number
threshold_type = optional(string, "Actual")
contact_emails = optional(list(string), [])
contact_roles = optional(list(string), [])
contact_groups = optional(list(string), [])
contact_emails = optional(list(string), null)
contact_roles = optional(list(string), null)
contact_groups = optional(list(string), null)
locale = optional(string, "en-us")
}))
default = {}
Expand Down Expand Up @@ -83,7 +83,7 @@ variable "budget_notifications" {
}
validation {
condition = alltrue([
for notification in var.budget_notifications : length(notification.contact_emails) > 0 || length(notification.contact_roles) > 0 || length(notification.contact_groups) > 0
for notification in var.budget_notifications : can(coalescelist(notification.contact_emails, notification.contact_roles, notification.contact_groups))
])
error_message = "At least one of contact_emails, contact_roles, or contact_groups must be supplied."
}
Expand Down

0 comments on commit 2bcd766

Please sign in to comment.