@@ -343,108 +343,6 @@ resource "google_workstations_workstation_config" "default" {
343343` , context )
344344}
345345
346- func TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample (t * testing.T ) {
347- t .Parallel ()
348-
349- context := map [string ]interface {}{
350- "random_suffix" : RandString (t , 10 ),
351- }
352-
353- VcrTest (t , resource.TestCase {
354- PreCheck : func () { testAccPreCheck (t ) },
355- Providers : TestAccProvidersOiCS ,
356- CheckDestroy : testAccCheckWorkstationsWorkstationConfigDestroyProducer (t ),
357- Steps : []resource.TestStep {
358- {
359- Config : testAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample (context ),
360- },
361- {
362- ResourceName : "google_workstations_workstation_config.default" ,
363- ImportState : true ,
364- ImportStateVerify : true ,
365- ImportStateVerifyIgnore : []string {"workstation_config_id" , "workstation_cluster_id" , "location" },
366- },
367- },
368- })
369- }
370-
371- func testAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample (context map [string ]interface {}) string {
372- return Nprintf (`
373- resource "google_compute_network" "default" {
374- provider = google-beta
375- name = "tf-test-workstation-cluster%{random_suffix}"
376- auto_create_subnetworks = false
377- }
378-
379- resource "google_compute_subnetwork" "default" {
380- provider = google-beta
381- name = "tf-test-workstation-cluster%{random_suffix}"
382- ip_cidr_range = "10.0.0.0/24"
383- region = "us-central1"
384- network = google_compute_network.default.name
385- }
386-
387- resource "google_workstations_workstation_cluster" "default" {
388- provider = google-beta
389- workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}"
390- network = google_compute_network.default.id
391- subnetwork = google_compute_subnetwork.default.id
392- location = "us-central1"
393-
394- labels = {
395- "label" = "key"
396- }
397-
398- annotations = {
399- label-one = "value-one"
400- }
401- }
402-
403- resource "google_kms_key_ring" "default" {
404- name = "tf-test-workstation-cluster%{random_suffix}"
405- location = "global"
406- provider = google-beta
407- }
408-
409- resource "google_kms_crypto_key" "default" {
410- name = "tf-test-workstation-cluster%{random_suffix}"
411- key_ring = google_kms_key_ring.default.id
412- rotation_period = "100000s"
413- provider = google-beta
414- }
415-
416- resource "google_service_account" "default" {
417- account_id = "tf-test-my-account%{random_suffix}"
418- display_name = "Service Account"
419- provider = google-beta
420- }
421-
422- resource "google_workstations_workstation_config" "default" {
423- provider = google-beta
424- workstation_config_id = "tf-test-workstation-config%{random_suffix}"
425- workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
426- location = "us-central1"
427-
428- host {
429- gce_instance {
430- machine_type = "e2-standard-4"
431- boot_disk_size_gb = 35
432- disable_public_ip_addresses = true
433- shielded_instance_config {
434- enable_secure_boot = true
435- enable_vtpm = true
436- }
437- }
438- }
439-
440- encryption_key {
441- kms_key = google_kms_crypto_key.default.id
442- kms_key_service_account = google_service_account.default.email
443- }
444- }
445- ` , context )
446- }
447-
448346func testAccCheckWorkstationsWorkstationConfigDestroyProducer (t * testing.T ) func (s * terraform.State ) error {
449347 return func (s * terraform.State ) error {
450348 for name , rs := range s .RootModule ().Resources {
0 commit comments