Skip to content

Commit f53d1f2

Browse files
authored
feat: (IAC-638): Updated variable description and validation blocks. (#278)
1 parent 1c03a8e commit f53d1f2

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

variables.tf

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,30 @@ variable "log_analytics_solution_promotion_code" {
491491
## Azure Monitor Diagonostic setting - Undocumented
492492
variable "resource_log_category" {
493493
type = list(string)
494-
description = "List of all resource logs category types supported in Azure Monitor."
494+
description = "List of all resource logs category types supported in Azure Monitor. See https://learn.microsoft.com/en-us/azure/aks/monitor-aks-reference#resource-logs "
495495
default = ["kube-controller-manager", "kube-apiserver", "kube-scheduler"]
496+
497+
validation {
498+
condition = length(var.resource_log_category) > 0
499+
error_message = <<EOT
500+
Please specify at least one resource log category. See the list of all resource logs category types
501+
supported in Azure Monitor here: https://learn.microsoft.com/en-us/azure/aks/monitor-aks-reference#resource-logs
502+
EOT
503+
}
496504
}
497505

498506
variable "metric_category" {
499507
type = list(string)
500-
description = "List of all metric category types supported in Azure Monitor."
508+
description = "List of all metric category types supported in Azure Monitor. See https://learn.microsoft.com/en-us/azure/aks/monitor-aks-reference#metrics"
501509
default = ["AllMetrics"]
510+
511+
validation {
512+
condition = length(var.metric_category) > 0
513+
error_message = <<EOT
514+
Please specify at least one metric category. See the list of all platform metrics supported in Azure Monitor
515+
here: https://learn.microsoft.com/en-us/azure/aks/monitor-aks-reference#metrics
516+
EOT
517+
}
502518
}
503519

504520
# BYO

0 commit comments

Comments
 (0)