60 lines
1.4 KiB
Terraform
60 lines
1.4 KiB
Terraform
|
|
# Variables for Budget Module
|
||
|
|
|
||
|
|
variable "subscription_id" {
|
||
|
|
description = "Azure subscription ID"
|
||
|
|
type = string
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "budget_name" {
|
||
|
|
description = "Name of the budget"
|
||
|
|
type = string
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "amount" {
|
||
|
|
description = "Budget amount"
|
||
|
|
type = number
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "time_grain" {
|
||
|
|
description = "Time grain (Monthly, Quarterly, Annually)"
|
||
|
|
type = string
|
||
|
|
default = "Monthly"
|
||
|
|
validation {
|
||
|
|
condition = contains(["Monthly", "Quarterly", "Annually"], var.time_grain)
|
||
|
|
error_message = "Time grain must be one of: Monthly, Quarterly, Annually"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "start_date" {
|
||
|
|
description = "Budget start date (ISO 8601 format)"
|
||
|
|
type = string
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "end_date" {
|
||
|
|
description = "Budget end date (ISO 8601 format)"
|
||
|
|
type = string
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "notification_thresholds" {
|
||
|
|
description = "List of notification thresholds (0-100)"
|
||
|
|
type = list(number)
|
||
|
|
default = [50, 80, 100]
|
||
|
|
validation {
|
||
|
|
condition = alltrue([for t in var.notification_thresholds : t >= 0 && t <= 100])
|
||
|
|
error_message = "Notification thresholds must be between 0 and 100"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "contact_emails" {
|
||
|
|
description = "List of email addresses for notifications"
|
||
|
|
type = list(string)
|
||
|
|
default = []
|
||
|
|
}
|
||
|
|
|
||
|
|
variable "contact_roles" {
|
||
|
|
description = "List of contact roles for notifications"
|
||
|
|
type = list(string)
|
||
|
|
default = ["Owner", "Contributor"]
|
||
|
|
}
|
||
|
|
|