File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,23 @@ resource "google_container_node_pool" "pools" {
131131 spot = lookup (each. value , " spot" , false )
132132 labels = lookup (var. node_pools_labels , each. value [" name" ], {})
133133 oauth_scopes = lookup (local. node_pool_oauth_scopes , each. value [" name" ], [])
134+
135+ dynamic "guest_accelerator" {
136+ for_each = lookup (each. value , " guest_accelerator" , null ) != null ? [1 ] : []
137+ content {
138+ type = lookup (each. value [" guest_accelerator" ], " type" , " " )
139+ count = lookup (each. value [" guest_accelerator" ], " count" , 0 )
140+ gpu_partition_size = lookup (each. value [" guest_accelerator" ], " gpu_partition_size" , null )
141+
142+ dynamic "gpu_sharing_config" {
143+ for_each = lookup (each. value [" guest_accelerator" ], " gpu_sharing_config" , null ) != null ? [1 ] : []
144+ content {
145+ gpu_sharing_strategy = lookup (gpu_sharing_config. value , " gpu_sharing_strategy" , " TIME_SHARING" )
146+ max_shared_clients_per_gpu = lookup (gpu_sharing_config. value , " max_shared_clients_per_gpu" , 2 )
147+ }
148+ }
149+ }
150+ }
134151 }
135152 lifecycle {
136153 ignore_changes = [initial_node_count ]
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ variable "zones" {
5555 description = " List of zones for `zonal` cluster. Required if `regional` set to `false`."
5656}
5757variable "node_pools" {
58- type = list (map ( string ) )
58+ type = list (any )
5959 default = [
6060 {
6161 name = " default-node-pool"
@@ -139,9 +139,11 @@ variable "additional_node_pool_oauth_scopes" {
139139variable "default_node_pools_oauth_scopes" {
140140 type = list (string )
141141 default = [
142+ " https://www.googleapis.com/auth/devstorage.read_only" ,
142143 " https://www.googleapis.com/auth/cloud-platform" ,
143144 " https://www.googleapis.com/auth/logging.write" ,
144- " https://www.googleapis.com/auth/monitoring"
145+ " https://www.googleapis.com/auth/monitoring" ,
146+ " https://www.googleapis.com/auth/compute"
145147 ]
146148 description = " Default node pool oauth scopes added to all node pools"
147149}
You can’t perform that action at this time.
0 commit comments