Skip to content

Commit a8c0fd4

Browse files
committed
colab: add workbench_runtime support to google_colab_notebook_execution
1 parent 67c69ea commit a8c0fd4

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

mmv1/products/colab/NotebookExecution.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ base_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs'
2424
self_link: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs/{{notebook_execution_job_id}}'
2525
immutable: true
2626
create_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs?notebook_execution_job_id={{notebook_execution_job_id}}'
27+
timeouts:
28+
insert_minutes: 60
2729
async:
2830
type: 'OpAsync'
2931
operation:
@@ -229,3 +231,31 @@ properties:
229231
- execution_user
230232
- service_account
231233
description: 'The service account to run the execution as.'
234+
- name: 'workbenchRuntime'
235+
type: NestedObject
236+
description: 'Configuration for a Workbench Instances-based environment.'
237+
properties:
238+
- name: 'vmImage'
239+
type: NestedObject
240+
description: |
241+
Definition of a custom Compute Engine virtual machine image for starting
242+
a notebook execution with the environment installed directly on the VM.
243+
properties:
244+
- name: 'project'
245+
type: String
246+
required: true
247+
description: |
248+
The name of the Google Cloud project that this VM image belongs to.
249+
Format: `{project_id}`
250+
- name: 'name'
251+
type: String
252+
description: 'Use this VM image name to find the image.'
253+
exactly_one_of:
254+
- workbench_runtime.0.vm_image.0.name
255+
- workbench_runtime.0.vm_image.0.family
256+
- name: 'family'
257+
type: String
258+
description: 'Use this VM image family to find the image; the newest image in this family will be used.'
259+
exactly_one_of:
260+
- workbench_runtime.0.vm_image.0.name
261+
- workbench_runtime.0.vm_image.0.family

mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_full.tf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" {
8080
gcs_output_uri = "gs://${google_storage_bucket.output_bucket.name}"
8181
notebook_runtime_template_resource_name = "projects/${google_colab_runtime_template.my_runtime_template.project}/locations/${google_colab_runtime_template.my_runtime_template.location}/notebookRuntimeTemplates/${google_colab_runtime_template.my_runtime_template.name}"
8282

83+
workbench_runtime {
84+
vm_image {
85+
project = "debian-cloud"
86+
family = "debian-11"
87+
}
88+
}
89+
8390
depends_on = [
8491
google_storage_bucket_object.notebook,
8592
google_storage_bucket.output_bucket,

0 commit comments

Comments
 (0)