diff --git a/.changelog/7415.txt b/.changelog/7415.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/7415.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/resource_workstations_workstation_config_generated_test.go b/google-beta/resource_workstations_workstation_config_generated_test.go index 40ae9b07d9..de7fb8f730 100644 --- a/google-beta/resource_workstations_workstation_config_generated_test.go +++ b/google-beta/resource_workstations_workstation_config_generated_test.go @@ -343,108 +343,6 @@ resource "google_workstations_workstation_config" "default" { `, context) } -func TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample(t *testing.T) { - t.Parallel() - - context := map[string]interface{}{ - "random_suffix": RandString(t, 10), - } - - VcrTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: TestAccProvidersOiCS, - CheckDestroy: testAccCheckWorkstationsWorkstationConfigDestroyProducer(t), - Steps: []resource.TestStep{ - { - Config: testAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample(context), - }, - { - ResourceName: "google_workstations_workstation_config.default", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"workstation_config_id", "workstation_cluster_id", "location"}, - }, - }, - }) -} - -func testAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample(context map[string]interface{}) string { - return Nprintf(` -resource "google_compute_network" "default" { - provider = google-beta - name = "tf-test-workstation-cluster%{random_suffix}" - auto_create_subnetworks = false -} - -resource "google_compute_subnetwork" "default" { - provider = google-beta - name = "tf-test-workstation-cluster%{random_suffix}" - ip_cidr_range = "10.0.0.0/24" - region = "us-central1" - network = google_compute_network.default.name -} - -resource "google_workstations_workstation_cluster" "default" { - provider = google-beta - workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}" - network = google_compute_network.default.id - subnetwork = google_compute_subnetwork.default.id - location = "us-central1" - - labels = { - "label" = "key" - } - - annotations = { - label-one = "value-one" - } -} - -resource "google_kms_key_ring" "default" { - name = "tf-test-workstation-cluster%{random_suffix}" - location = "global" - provider = google-beta -} - -resource "google_kms_crypto_key" "default" { - name = "tf-test-workstation-cluster%{random_suffix}" - key_ring = google_kms_key_ring.default.id - rotation_period = "100000s" - provider = google-beta -} - -resource "google_service_account" "default" { - account_id = "tf-test-my-account%{random_suffix}" - display_name = "Service Account" - provider = google-beta -} - -resource "google_workstations_workstation_config" "default" { - provider = google-beta - workstation_config_id = "tf-test-workstation-config%{random_suffix}" - workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id - location = "us-central1" - - host { - gce_instance { - machine_type = "e2-standard-4" - boot_disk_size_gb = 35 - disable_public_ip_addresses = true - shielded_instance_config { - enable_secure_boot = true - enable_vtpm = true - } - } - } - - encryption_key { - kms_key = google_kms_crypto_key.default.id - kms_key_service_account = google_service_account.default.email - } -} -`, context) -} - func testAccCheckWorkstationsWorkstationConfigDestroyProducer(t *testing.T) func(s *terraform.State) error { return func(s *terraform.State) error { for name, rs := range s.RootModule().Resources { diff --git a/website/docs/r/workstations_workstation_config.html.markdown b/website/docs/r/workstations_workstation_config.html.markdown index 02bfdd2014..48173f40fd 100644 --- a/website/docs/r/workstations_workstation_config.html.markdown +++ b/website/docs/r/workstations_workstation_config.html.markdown @@ -270,11 +270,6 @@ resource "google_workstations_workstation_config" "default" { } } ``` -
## Example Usage - Workstation Config Encryption Key