Skip to content

Commit 14cf611

Browse files
Add google_workbench_instance to TGC tfplan2cai converter (#15573)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent cdc3f38 commit 14cf611

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

mmv1/third_party/tgc/resource_converters.go.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ func ResourceConverters() map[string][]cai.ResourceConverter {
210210
"google_cloudfunctions_function": {cloudfunctions.ResourceConverterCloudFunctionsCloudFunction()},
211211
"google_monitoring_notification_channel": {monitoring.ResourceConverterMonitoringNotificationChannel()},
212212
"google_monitoring_alert_policy": {monitoring.ResourceConverterMonitoringAlertPolicy()},
213-
"google_vertex_ai_dataset": {vertexai.ResourceConverterVertexAIDataset()},
213+
"google_vertex_ai_dataset": {vertexai.ResourceConverterVertexAIDataset()},
214+
"google_workbench_instance": {workbench.ResourceConverterWorkbenchInstance()},
214215
{{- range $object := $.IamResources }}
215216
{{- if $object.IamClassName }}
216217
"{{ $object.TerraformName }}_iam_policy": { {{- $object.IamClassName }}IamPolicy()},
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[
2+
{
3+
"name": "//notebooks.googleapis.com/projects/{{.Provider.project}}/locations/us-central1-a/instances/workbench-instance-cai",
4+
"asset_type": "notebooks.googleapis.com/Instance",
5+
"ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}",
6+
"resource": {
7+
"version": "v2",
8+
"discovery_document_uri": "https://notebooks.googleapis.com/$discovery/rest",
9+
"discovery_name": "Instance",
10+
"parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}",
11+
"data": {
12+
"gceSetup": {
13+
"machineType": "e2-standard-2",
14+
"shieldedInstanceConfig": {
15+
"enableSecureBoot": true,
16+
"enableVtpm": true,
17+
"enableIntegrityMonitoring": true
18+
}
19+
},
20+
"labels": {
21+
"goog-terraform-provisioned": "true"
22+
}
23+
}
24+
}
25+
}
26+
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
resource "google_workbench_instance" "basic" {
3+
name = "workbench-instance-cai"
4+
location = "us-central1-a"
5+
gce_setup {
6+
machine_type = "e2-standard-2"
7+
shielded_instance_config {
8+
enable_secure_boot = true
9+
enable_vtpm = true
10+
enable_integrity_monitoring = true
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)