@@ -337,6 +337,64 @@ resource "google_workstations_workstation_config" "default" {
337
337
}
338
338
}
339
339
```
340
+ <div class = " oics-button " style =" float : right ; margin : 0 0 -15px " >
341
+ <a href =" https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.jpy.wang%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=workstation_config_accelerators&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md " target =" _blank " >
342
+ <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
343
+ </a >
344
+ </div >
345
+ ## Example Usage - Workstation Config Accelerators
346
+
347
+
348
+ ``` hcl
349
+ resource "google_compute_network" "default" {
350
+ provider = google-beta
351
+ name = "workstation-cluster"
352
+ auto_create_subnetworks = false
353
+ }
354
+
355
+ resource "google_compute_subnetwork" "default" {
356
+ provider = google-beta
357
+ name = "workstation-cluster"
358
+ ip_cidr_range = "10.0.0.0/24"
359
+ region = "us-central1"
360
+ network = google_compute_network.default.name
361
+ }
362
+
363
+ resource "google_workstations_workstation_cluster" "default" {
364
+ provider = google-beta
365
+ workstation_cluster_id = "workstation-cluster"
366
+ network = google_compute_network.default.id
367
+ subnetwork = google_compute_subnetwork.default.id
368
+ location = "us-central1"
369
+
370
+ labels = {
371
+ "label" = "key"
372
+ }
373
+
374
+ annotations = {
375
+ label-one = "value-one"
376
+ }
377
+ }
378
+
379
+ resource "google_workstations_workstation_config" "default" {
380
+ provider = google-beta
381
+ workstation_config_id = "workstation-config"
382
+ workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
383
+ location = "us-central1"
384
+
385
+ host {
386
+ gce_instance {
387
+ machine_type = "n1-standard-2"
388
+ boot_disk_size_gb = 35
389
+ disable_public_ip_addresses = true
390
+ accelerators {
391
+ type = "nvidia-tesla-p100"
392
+ count = "1"
393
+ }
394
+ }
395
+ }
396
+ }
397
+ ```
340
398
<div class = " oics-button " style =" float : right ; margin : 0 0 -15px " >
341
399
<a href =" https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.jpy.wang%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=workstation_config_encryption_key&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md " target =" _blank " >
342
400
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
@@ -540,6 +598,11 @@ The following arguments are supported:
540
598
A set of Compute Engine Confidential VM instance options.
541
599
Structure is [ documented below] ( #nested_confidential_instance_config ) .
542
600
601
+ * ` accelerators ` -
602
+ (Optional)
603
+ An accelerator card attached to the instance.
604
+ Structure is [ documented below] ( #nested_accelerators ) .
605
+
543
606
544
607
<a name =" nested_shielded_instance_config " ></a >The ` shielded_instance_config ` block supports:
545
608
@@ -561,6 +624,16 @@ The following arguments are supported:
561
624
(Optional)
562
625
Whether the instance has confidential compute enabled.
563
626
627
+ <a name =" nested_accelerators " ></a >The ` accelerators ` block supports:
628
+
629
+ * ` type ` -
630
+ (Required)
631
+ Type of accelerator resource to attach to the instance, for example, "nvidia-tesla-p100".
632
+
633
+ * ` count ` -
634
+ (Required)
635
+ Number of accelerator cards exposed to the instance.
636
+
564
637
<a name =" nested_persistent_directories " ></a >The ` persistent_directories ` block supports:
565
638
566
639
* ` mount_path ` -
0 commit comments