File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
workbench_instance_basic_gpu Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ resource "google_compute_reservation" "gpu_reservation" {
2
+ name = " wbi-reservation-${ local . name_suffix } "
3
+ zone = " us-central1-a"
4
+
5
+ specific_reservation {
6
+ count = 1
7
+
8
+ instance_properties {
9
+ machine_type = " n1-standard-1"
10
+
11
+ guest_accelerators {
12
+ accelerator_type = " nvidia-tesla-t4"
13
+ accelerator_count = 1
14
+ }
15
+ }
16
+ }
17
+
18
+ specific_reservation_required = false
19
+ }
20
+
1
21
resource "google_workbench_instance" "instance" {
2
22
name = " workbench-instance-${ local . name_suffix } "
3
23
location = " us-central1-a"
@@ -11,5 +31,13 @@ resource "google_workbench_instance" "instance" {
11
31
project = " cloud-notebooks-managed"
12
32
family = " workbench-instances"
13
33
}
34
+ reservation_affinity {
35
+ consume_reservation_type = " RESERVATION_ANY"
36
+ }
14
37
}
38
+
39
+ depends_on = [
40
+ google_compute_reservation . gpu_reservation
41
+ ]
42
+
15
43
}
You can’t perform that action at this time.
0 commit comments