Skip to content

Commit

Permalink
Merge pull request #3259 from ankitkinra/gpu-latest-version-2
Browse files Browse the repository at this point in the history
Fix the gpu_installation_config default for case where no customer input
  • Loading branch information
ankitkinra authored Nov 14, 2024
2 parents a2376e2 + b2cdd88 commit f62f2bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/compute/gke-node-pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ resource "google_container_node_pool" "node_pool" {
gpu_partition_size = try(ga.value.gpu_partition_size, null)

dynamic "gpu_driver_installation_config" {
for_each = coalescelist([ga.value.gpu_driver_installation_config], [{ gpu_driver_version = "DEFAULT" }])
# in case user did not specify guest_accelerator settings, we need a try to default to []
for_each = try([ga.value.gpu_driver_installation_config], [{ gpu_driver_version = "DEFAULT" }])
iterator = gdic
content {
gpu_driver_version = gdic.value.gpu_driver_version
Expand Down

0 comments on commit f62f2bc

Please sign in to comment.