-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbudget-variables.tf
38 lines (35 loc) · 1.44 KB
/
budget-variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -----------------------------------------------------------------------------
# Required inputs
# -----------------------------------------------------------------------------
variable "budget_alerting" {
description = "Set to true to enable budget alerting"
type = bool
default = false
}
variable "budget_amount" {
description = "(Required if using budget alerts): The amount of the budget expressed as a number in the currency of the customer's rate card."
type = string
default = ""
}
variable "budget_alert_rule_threshold" {
description = "(Required if using budget alerts): The target spending threshold for the budget"
type = string
default = ""
}
variable "budget_alert_rule_recipients" {
description = "(Required if using budget alerts): Target email address for budget alerts"
type = string
default = ""
validation {
condition = can(regex("^([^\\s@]+@([^\\s@\\.,]+\\.)+[^\\s@\\.,]{2,})?$", var.budget_alert_rule_recipients))
error_message = "Must be a list of valid email addresses."
}
}
# -----------------------------------------------------------------------------
# Optional inputs and values to override
# -----------------------------------------------------------------------------
variable "budget_alert_rule_message" {
description = "(Optional if using budget alerts): The alert message for budget alerts."
default = "Default budget alert"
type = string
}