Add dashboard UID auto-generation and Gitea dev workflow
This commit is contained in:
32
environments/modules/grafana_dashboard/variables.tf
Normal file
32
environments/modules/grafana_dashboard/variables.tf
Normal file
@ -0,0 +1,32 @@
|
||||
variable "org_id" {
|
||||
description = "ID of the organization for dashboards"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "groups" {
|
||||
description = "List of alert groups with their definitions and data sources"
|
||||
type = list(object({
|
||||
dashboard_alert_group_name = string
|
||||
alert_definitions_path = string
|
||||
dashboard_path_if_exist = optional(string, null)
|
||||
keep_manual_changes = optional(bool, false)
|
||||
prevent_destroy_on_recreate = optional(bool, false)
|
||||
alerts_on_datasources_uid = list(string)
|
||||
}))
|
||||
}
|
||||
|
||||
variable "folder_ids" {
|
||||
description = "Mapping of folder IDs for each alert group"
|
||||
type = map(string)
|
||||
}
|
||||
|
||||
variable "dashboard_uid_max_length" {
|
||||
description = "Maximum length of generated dashboard UID"
|
||||
type = number
|
||||
default = 40
|
||||
|
||||
validation {
|
||||
condition = var.dashboard_uid_max_length > 0 && var.dashboard_uid_max_length <= 40
|
||||
error_message = "dashboard_uid_max_length must be between 1 and 40."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user