Added validation for workspace sku

This commit is contained in:
Tom Archer
2023-05-12 17:30:37 -07:00
parent 71cee46b77
commit 669f6c96c6
2 changed files with 9 additions and 4 deletions

View File

@ -21,15 +21,20 @@ variable "node_count" {
variable "log_analytics_workspace_location" {
type = string
default = "eastus"
description = "Location of the log analytics workspace."
description = "Location of the Log Analytics workspace."
}
# For Log Analytics pricing, refer to:
# https://azure.microsoft.com/pricing/details/monitor
variable "log_analytics_workspace_sku" {
type = string
description = ""
description = "The SKU of the Log Analytics workspace. Choose from: Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, PerGB2018"
default = "PerGB2018"
validation {
condition = contains(["Free", "PerNode", "Premium", "Standard", "Standalone", "Unlimited", "CapacityReservation", "PerGB2018"], var.log_analytics_workspace_sku)
error_message = "The Log Analytics workspace SKU must be one of the following: Free, PerNode, Premium, Standard, Standalone, Unlimited, CapacityReservation, PerGB2018"
}
}
variable "msi_id" {