diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 2f3a93919..b0e18e90c 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -830,6 +830,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/cluster.tf b/cluster.tf index 7c8b05cda..7bda36dce 100644 --- a/cluster.tf +++ b/cluster.tf @@ -528,6 +528,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -716,6 +723,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 37f99b9b3..a7cac13f1 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -716,6 +716,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -944,6 +951,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 520b0529a..6ef325343 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -641,6 +641,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -868,6 +875,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 5a6ae6e11..2a8265e23 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -697,6 +697,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -925,6 +932,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index a8db1c6e1..497dd389e 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -622,6 +622,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -849,6 +856,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 17ed665c9..a12adedb4 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -622,6 +622,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -811,6 +818,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index c2fa9906d..75d2b0a75 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -547,6 +547,13 @@ resource "google_container_node_pool" "pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } } @@ -735,6 +742,13 @@ resource "google_container_node_pool" "windows_pools" { type = lookup(each.value, "accelerator_type", "") count = lookup(each.value, "accelerator_count", 0) gpu_partition_size = lookup(each.value, "gpu_partition_size", null) + + dynamic "gpu_driver_installation_config" { + for_each = lookup(each.value, "gpu_driver_version", "") != "" ? [1] : [] + content { + gpu_driver_version = lookup(each.value, "gpu_driver_version", "") + } + } } }