Skip to content

Commit 4fb4461

Browse files
authored
Confidential compute for workbench instances (#13311)
1 parent 89e6356 commit 4fb4461

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

mmv1/products/workbench/Instance.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ examples:
105105
- 'gce_setup.0.vm_image'
106106
- 'gce_setup.0.boot_disk.0.disk_type'
107107
- 'gce_setup.0.data_disks.0.disk_type'
108+
- name: 'workbench_instance_confidential_compute'
109+
primary_resource_id: 'instance'
110+
primary_resource_name: 'fmt.Sprintf("tf-test-workbench-instance%s", context["random_suffix"])'
111+
region_override: 'us-west1-a'
112+
vars:
113+
instance_name: 'workbench-instance'
108114
virtual_fields:
109115
- name: 'desired_state'
110116
description: |
@@ -441,6 +447,18 @@ properties:
441447
Optional. Flag to enable ip forwarding or not, default false/off.
442448
https://cloud.google.com/vpc/docs/using-routes#canipforward
443449
immutable: true
450+
- name: 'confidentialInstanceConfig'
451+
type: NestedObject
452+
immutable: true
453+
description: |
454+
Confidential instance configuration.
455+
properties:
456+
- name: 'confidentialInstanceType'
457+
type: Enum
458+
description: |
459+
Defines the type of technology used by the confidential instance.
460+
enum_values:
461+
- 'SEV'
444462
- name: 'proxyUri'
445463
type: String
446464
description: |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
resource "google_workbench_instance" "{{$.PrimaryResourceId}}" {
2+
name = "{{index $.Vars "instance_name"}}"
3+
location = "us-central1-a"
4+
5+
gce_setup {
6+
machine_type = "n2d-standard-2" // cant be e2 because of accelerator
7+
8+
shielded_instance_config {
9+
enable_secure_boot = true
10+
enable_vtpm = true
11+
enable_integrity_monitoring = true
12+
}
13+
14+
metadata = {
15+
terraform = "true"
16+
}
17+
18+
confidential_instance_config {
19+
confidential_instance_type = "SEV"
20+
}
21+
22+
}
23+
}

0 commit comments

Comments
 (0)