Fix validation and dynamic block for optional gpu_driver

This commit is contained in:
Artur Pacan
2023-11-08 11:49:15 +00:00
parent c7bef582e8
commit fca89b57ed
2 changed files with 2 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ variable "node_config" {
validation {
condition = (
alltrue([
for k, v in var.node_config.guest_accelerator[*].gpu_driver : contains([
for k, v in try(var.node_config.guest_accelerator[0].gpu_driver, {}) : contains([
"GPU_DRIVER_VERSION_UNSPECIFIED", "INSTALLATION_DISABLED",
"DEFAULT", "LATEST"
], v.version)