Skip to content

Commit 9350a61

Browse files
Put workstation test key ring in workstation location (#8223) (#5827)
Signed-off-by: Modular Magician <[email protected]>
1 parent b67baaf commit 9350a61

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

.changelog/8223.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```release-note:none
2+
```

google-beta/resource_workstations_workstation_config_generated_test.go

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -465,21 +465,24 @@ func TestAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample(
465465
func testAccWorkstationsWorkstationConfig_workstationConfigEncryptionKeyExample(context map[string]interface{}) string {
466466
return tpgresource.Nprintf(`
467467
resource "google_compute_network" "default" {
468-
provider = google-beta
468+
provider = google-beta
469+
469470
name = "tf-test-workstation-cluster%{random_suffix}"
470471
auto_create_subnetworks = false
471472
}
472473
473474
resource "google_compute_subnetwork" "default" {
474-
provider = google-beta
475+
provider = google-beta
476+
475477
name = "tf-test-workstation-cluster%{random_suffix}"
476478
ip_cidr_range = "10.0.0.0/24"
477479
region = "us-central1"
478480
network = google_compute_network.default.name
479481
}
480482
481483
resource "google_workstations_workstation_cluster" "default" {
482-
provider = google-beta
484+
provider = google-beta
485+
483486
workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}"
484487
network = google_compute_network.default.id
485488
subnetwork = google_compute_subnetwork.default.id
@@ -495,25 +498,29 @@ resource "google_workstations_workstation_cluster" "default" {
495498
}
496499
497500
resource "google_kms_key_ring" "default" {
498-
name = "tf-test-workstation-cluster%{random_suffix}"
499-
location = "global"
500501
provider = google-beta
502+
503+
name = "tf-test-workstation-cluster%{random_suffix}"
504+
location = "us-central1"
501505
}
502506
503507
resource "google_kms_crypto_key" "default" {
508+
provider = google-beta
509+
504510
name = "tf-test-workstation-cluster%{random_suffix}"
505511
key_ring = google_kms_key_ring.default.id
506-
provider = google-beta
507512
}
508513
509514
resource "google_service_account" "default" {
515+
provider = google-beta
516+
510517
account_id = "tf-test-my-account%{random_suffix}"
511518
display_name = "Service Account"
512-
provider = google-beta
513519
}
514520
515521
resource "google_workstations_workstation_config" "default" {
516522
provider = google-beta
523+
517524
workstation_config_id = "tf-test-workstation-config%{random_suffix}"
518525
workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
519526
location = "us-central1"

website/docs/r/workstations_workstation_config.html.markdown

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,21 +347,24 @@ resource "google_workstations_workstation_config" "default" {
347347

348348
```hcl
349349
resource "google_compute_network" "default" {
350-
provider = google-beta
350+
provider = google-beta
351+
351352
name = "workstation-cluster"
352353
auto_create_subnetworks = false
353354
}
354355
355356
resource "google_compute_subnetwork" "default" {
356-
provider = google-beta
357+
provider = google-beta
358+
357359
name = "workstation-cluster"
358360
ip_cidr_range = "10.0.0.0/24"
359361
region = "us-central1"
360362
network = google_compute_network.default.name
361363
}
362364
363365
resource "google_workstations_workstation_cluster" "default" {
364-
provider = google-beta
366+
provider = google-beta
367+
365368
workstation_cluster_id = "workstation-cluster"
366369
network = google_compute_network.default.id
367370
subnetwork = google_compute_subnetwork.default.id
@@ -377,25 +380,29 @@ resource "google_workstations_workstation_cluster" "default" {
377380
}
378381
379382
resource "google_kms_key_ring" "default" {
380-
name = "workstation-cluster"
381-
location = "global"
382383
provider = google-beta
384+
385+
name = "workstation-cluster"
386+
location = "us-central1"
383387
}
384388
385389
resource "google_kms_crypto_key" "default" {
390+
provider = google-beta
391+
386392
name = "workstation-cluster"
387393
key_ring = google_kms_key_ring.default.id
388-
provider = google-beta
389394
}
390395
391396
resource "google_service_account" "default" {
397+
provider = google-beta
398+
392399
account_id = "my-account"
393400
display_name = "Service Account"
394-
provider = google-beta
395401
}
396402
397403
resource "google_workstations_workstation_config" "default" {
398404
provider = google-beta
405+
399406
workstation_config_id = "workstation-config"
400407
workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
401408
location = "us-central1"

0 commit comments

Comments
 (0)