@@ -4454,3 +4454,64 @@ resource "google_container_node_pool" "np" {
4454
4454
}
4455
4455
` , secretID , cluster , network , subnetwork , nodepool )
4456
4456
}
4457
+
4458
+ func TestAccContainerNodePool_defaultDriverInstallation (t * testing.T ) {
4459
+ t .Parallel ()
4460
+
4461
+ cluster := fmt .Sprintf ("tf-test-cluster-%s" , acctest .RandString (t , 10 ))
4462
+ np := fmt .Sprintf ("tf-test-nodepool-%s" , acctest .RandString (t , 10 ))
4463
+
4464
+ acctest .VcrTest (t , resource.TestCase {
4465
+ PreCheck : func () { acctest .AccTestPreCheck (t ) },
4466
+ ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
4467
+ CheckDestroy : testAccCheckContainerNodePoolDestroyProducer (t ),
4468
+ Steps : []resource.TestStep {
4469
+ {
4470
+ Config : testAccContainerNodePool_defaultDriverInstallation (cluster , np ),
4471
+ },
4472
+ {
4473
+ ResourceName : "google_container_node_pool.np" ,
4474
+ ImportState : true ,
4475
+ ImportStateVerify : true ,
4476
+ },
4477
+ },
4478
+ })
4479
+ }
4480
+
4481
+ func testAccContainerNodePool_defaultDriverInstallation (cluster , np string ) string {
4482
+ return fmt .Sprintf (`
4483
+ resource "google_container_cluster" "cluster" {
4484
+ name = "%s"
4485
+ location = "us-central1-a"
4486
+ initial_node_count = 3
4487
+ deletion_protection = false
4488
+
4489
+ min_master_version = "1.30.1-gke.1329003"
4490
+ release_channel {
4491
+ channel = "RAPID"
4492
+ }
4493
+ }
4494
+
4495
+ resource "google_container_node_pool" "np" {
4496
+ name = "%s"
4497
+ location = "us-central1-a"
4498
+ cluster = google_container_cluster.cluster.name
4499
+ initial_node_count = 2
4500
+ version = "1.30.1-gke.1329003"
4501
+
4502
+ node_config {
4503
+ service_account = "default"
4504
+ machine_type = "n1-standard-8"
4505
+
4506
+ guest_accelerator {
4507
+ type = "nvidia-tesla-t4"
4508
+ count = 1
4509
+ gpu_sharing_config {
4510
+ gpu_sharing_strategy = "TIME_SHARING"
4511
+ max_shared_clients_per_gpu = 3
4512
+ }
4513
+ }
4514
+ }
4515
+ }
4516
+ ` , cluster , np )
4517
+ }
0 commit comments