From d4b35758054c6e962eba08ae1ea9c1a0efef8890 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Thu, 30 Jul 2026 10:54:56 -0700 Subject: [PATCH 1/9] Added missing fields to NotebookExecution resource --- mmv1/products/colab/NotebookExecution.yaml | 57 +++++++++++++++ ...olab_notebook_execution_custom_env.tf.tmpl | 6 ++ ...tebook_execution_workbench_runtime.tf.tmpl | 70 +++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 6e832a2bd97c..8cd0b7a0655e 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -57,6 +57,17 @@ samples: service_account: 'SERVICE_ACCT' ignore_read_extra: - direct_notebook_source.0.content + - name: 'colab_notebook_execution_workbench_runtime' + primary_resource_id: 'notebook-execution' + steps: + - name: 'colab_notebook_execution_workbench_runtime' + resource_id_vars: + bucket: 'my_bucket' + test_env_vars: + project_id: 'PROJECT_NAME' + service_account: 'SERVICE_ACCT' + ignore_read_extra: + - direct_notebook_source.0.content - name: 'colab_notebook_execution_full' min_version: beta primary_resource_id: 'notebook-execution' @@ -164,12 +175,14 @@ properties: exactly_one_of: - notebook_runtime_template_resource_name - custom_environment_spec + - workbench_runtime - name: customEnvironmentSpec type: NestedObject description: Compute configuration to use for an execution job exactly_one_of: - notebook_runtime_template_resource_name - custom_environment_spec + - workbench_runtime properties: - name: machineSpec type: NestedObject @@ -213,6 +226,50 @@ properties: type: String description: 'The name of the subnetwork that this runtime is in.' diff_suppress_func: 'tpgresource.CompareSelfLinkRelativePaths' + - name: shieldedInstanceConfig + type: NestedObject + description: 'Optional. Shielded VM configuration.' + properties: + - name: enableIntegrityMonitoring + type: Boolean + description: 'Optional. Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.' + - name: enableSecureBoot + type: Boolean + description: 'Optional. Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.' + - name: enableVtpm + type: Boolean + description: 'Optional. Defines whether the instance has the vTPM enabled. Enabled by default.' + - name: workbenchRuntime + type: NestedObject + description: 'Configuration for a Workbench Instances-based environment.' + exactly_one_of: + - notebook_runtime_template_resource_name + - custom_environment_spec + - workbench_runtime + properties: + - name: customContainerImage + type: NestedObject + description: 'Optional. Custom container image for the Workbench instance.' + properties: + - name: repository + type: String + description: 'The path to the container image repository. For example: gcr.io/{project_id}/{imageName}' + - name: tag + type: String + description: 'The tag of the container image. If not specified, this defaults to the latest tag.' + - name: vmImage + type: NestedObject + description: 'Optional. Custom Compute Engine VM image for the Workbench instance.' + properties: + - name: family + type: String + description: 'Optional. Use this VM image family to find the image; the newest image in this family will be used.' + - name: name + type: String + description: 'Optional. Use VM image name to find the image.' + - name: project + type: String + description: 'The name of the Google Cloud project that this VM image belongs to. Format: {project_id}' - name: 'gcsOutputUri' required: true type: String diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_custom_env.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_custom_env.tf.tmpl index bd5f449bfe09..daff81fead22 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_custom_env.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_custom_env.tf.tmpl @@ -78,6 +78,12 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { network = google_compute_network.my_network.id subnetwork = google_compute_subnetwork.my_subnetwork.id } + + shielded_instance_config { + enable_integrity_monitoring = true + enable_secure_boot = true + enable_vtpm = true + } } gcs_output_uri = "gs://${google_storage_bucket.output_bucket.name}" diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl new file mode 100644 index 000000000000..32bcb1b079cb --- /dev/null +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -0,0 +1,70 @@ +resource "google_storage_bucket" "output_bucket" { + name = "{{index $.ResourceIdVars "bucket"}}" + location = "US" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { + display_name = "Notebook execution workbench runtime" + location = "us-central1" + + direct_notebook_source { + content = base64encode(< Date: Thu, 30 Jul 2026 11:00:44 -0700 Subject: [PATCH 2/9] Added missing field to test --- .../colab/colab_notebook_execution_workbench_runtime.tf.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index 32bcb1b079cb..e7af8de1beed 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -57,6 +57,7 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { vm_image { project = "cloud-notebooks-managed" family = "workbench-instances" + name = "workbench-instances-v20230925" } } From f6b82f6c3d415cbb6677287cad6309cb8708cd9f Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Thu, 30 Jul 2026 11:26:54 -0700 Subject: [PATCH 3/9] Added more tests to handle mutually exclusive fields and added exactly_one_of notations --- mmv1/products/colab/NotebookExecution.yaml | 34 ++++++++++ ...tebook_execution_workbench_runtime.tf.tmpl | 5 -- ...ook_execution_workbench_runtime_vm.tf.tmpl | 66 +++++++++++++++++++ ...xecution_workbench_runtime_vm_name.tf.tmpl | 66 +++++++++++++++++++ 4 files changed, 166 insertions(+), 5 deletions(-) create mode 100644 mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl create mode 100644 mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 8cd0b7a0655e..8b1a578187f9 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -68,6 +68,28 @@ samples: service_account: 'SERVICE_ACCT' ignore_read_extra: - direct_notebook_source.0.content + - name: 'colab_notebook_execution_workbench_runtime_vm' + primary_resource_id: 'notebook-execution' + steps: + - name: 'colab_notebook_execution_workbench_runtime_vm' + resource_id_vars: + bucket: 'my_bucket' + test_env_vars: + project_id: 'PROJECT_NAME' + service_account: 'SERVICE_ACCT' + ignore_read_extra: + - direct_notebook_source.0.content + - name: 'colab_notebook_execution_workbench_runtime_vm_name' + primary_resource_id: 'notebook-execution' + steps: + - name: 'colab_notebook_execution_workbench_runtime_vm_name' + resource_id_vars: + bucket: 'my_bucket' + test_env_vars: + project_id: 'PROJECT_NAME' + service_account: 'SERVICE_ACCT' + ignore_read_extra: + - direct_notebook_source.0.content - name: 'colab_notebook_execution_full' min_version: beta primary_resource_id: 'notebook-execution' @@ -250,6 +272,9 @@ properties: - name: customContainerImage type: NestedObject description: 'Optional. Custom container image for the Workbench instance.' + exactly_one_of: + - workbench_runtime.0.custom_container_image + - workbench_runtime.0.vm_image properties: - name: repository type: String @@ -260,12 +285,21 @@ properties: - name: vmImage type: NestedObject description: 'Optional. Custom Compute Engine VM image for the Workbench instance.' + exactly_one_of: + - workbench_runtime.0.custom_container_image + - workbench_runtime.0.vm_image properties: - name: family type: String + exactly_one_of: + - workbench_runtime.0.vm_image.0.family + - workbench_runtime.0.vm_image.0.name description: 'Optional. Use this VM image family to find the image; the newest image in this family will be used.' - name: name type: String + exactly_one_of: + - workbench_runtime.0.vm_image.0.family + - workbench_runtime.0.vm_image.0.name description: 'Optional. Use VM image name to find the image.' - name: project type: String diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index e7af8de1beed..ccc0181ded9a 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -54,11 +54,6 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { repository = "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/base-cu113.py310" tag = "latest" } - vm_image { - project = "cloud-notebooks-managed" - family = "workbench-instances" - name = "workbench-instances-v20230925" - } } gcs_output_uri = "gs://${google_storage_bucket.output_bucket.name}" diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl new file mode 100644 index 000000000000..49ce60091a35 --- /dev/null +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl @@ -0,0 +1,66 @@ +resource "google_storage_bucket" "output_bucket" { + name = "{{index $.ResourceIdVars "bucket"}}" + location = "US" + force_destroy = true + uniform_bucket_level_access = true +} + +resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { + display_name = "Notebook execution workbench runtime vm" + location = "us-central1" + + direct_notebook_source { + content = base64encode(< Date: Thu, 30 Jul 2026 11:55:04 -0700 Subject: [PATCH 4/9] Corrected tests to supply an environment spec --- mmv1/products/colab/NotebookExecution.yaml | 6 ------ .../colab_notebook_execution_workbench_runtime.tf.tmpl | 6 ++++++ .../colab_notebook_execution_workbench_runtime_vm.tf.tmpl | 6 ++++++ ...lab_notebook_execution_workbench_runtime_vm_name.tf.tmpl | 6 ++++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 8b1a578187f9..880b99f6a75f 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -197,14 +197,12 @@ properties: exactly_one_of: - notebook_runtime_template_resource_name - custom_environment_spec - - workbench_runtime - name: customEnvironmentSpec type: NestedObject description: Compute configuration to use for an execution job exactly_one_of: - notebook_runtime_template_resource_name - custom_environment_spec - - workbench_runtime properties: - name: machineSpec type: NestedObject @@ -264,10 +262,6 @@ properties: - name: workbenchRuntime type: NestedObject description: 'Configuration for a Workbench Instances-based environment.' - exactly_one_of: - - notebook_runtime_template_resource_name - - custom_environment_spec - - workbench_runtime properties: - name: customContainerImage type: NestedObject diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index ccc0181ded9a..4db057ff0c18 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -49,6 +49,12 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { ) } + custom_environment_spec { + machine_spec { + machine_type = "n1-standard-2" + } + } + workbench_runtime { custom_container_image { repository = "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/base-cu113.py310" diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl index 49ce60091a35..28b70862fa88 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl @@ -49,6 +49,12 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { ) } + custom_environment_spec { + machine_spec { + machine_type = "n1-standard-2" + } + } + workbench_runtime { vm_image { project = "cloud-notebooks-managed" diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl index fd56c6c94daa..69173796cb14 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl @@ -49,6 +49,12 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { ) } + custom_environment_spec { + machine_spec { + machine_type = "n1-standard-2" + } + } + workbench_runtime { vm_image { project = "cloud-notebooks-managed" From b99d4d72c04870e5648de990b61d657ae2cbc681 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Thu, 30 Jul 2026 14:35:46 -0700 Subject: [PATCH 5/9] Fixed test failures --- mmv1/products/colab/NotebookExecution.yaml | 2 ++ .../colab/colab_notebook_execution_workbench_runtime.tf.tmpl | 5 +++++ .../colab_notebook_execution_workbench_runtime_vm.tf.tmpl | 5 +++++ ...olab_notebook_execution_workbench_runtime_vm_name.tf.tmpl | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 880b99f6a75f..9645bc196367 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -248,6 +248,8 @@ properties: diff_suppress_func: 'tpgresource.CompareSelfLinkRelativePaths' - name: shieldedInstanceConfig type: NestedObject + # GCP API does not return shieldedInstanceConfig in GET responses for NotebookExecutionJob. + ignore_read: true description: 'Optional. Shielded VM configuration.' properties: - name: enableIntegrityMonitoring diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index 4db057ff0c18..6981c4b67f1c 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -53,6 +53,11 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { machine_spec { machine_type = "n1-standard-2" } + + persistent_disk_spec { + disk_type = "pd-standard" + disk_size_gb = 200 + } } workbench_runtime { diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl index 28b70862fa88..5ecb8353f19f 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm.tf.tmpl @@ -53,6 +53,11 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { machine_spec { machine_type = "n1-standard-2" } + + persistent_disk_spec { + disk_type = "pd-standard" + disk_size_gb = 200 + } } workbench_runtime { diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl index 69173796cb14..f7dd0d442077 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl @@ -53,6 +53,11 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { machine_spec { machine_type = "n1-standard-2" } + + persistent_disk_spec { + disk_type = "pd-standard" + disk_size_gb = 200 + } } workbench_runtime { From 28e4d2de7d7afcf4203606f4cca28d35b07acc8b Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Thu, 30 Jul 2026 15:53:43 -0700 Subject: [PATCH 6/9] Attempted to fix the failing tests --- mmv1/products/colab/NotebookExecution.yaml | 2 ++ .../colab_notebook_execution_workbench_runtime.tf.tmpl | 2 +- ...ab_notebook_execution_workbench_runtime_vm_name.tf.tmpl | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 9645bc196367..c220cb9d17b5 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -263,6 +263,8 @@ properties: description: 'Optional. Defines whether the instance has the vTPM enabled. Enabled by default.' - name: workbenchRuntime type: NestedObject + # GCP API does not return workbenchRuntime in GET responses for NotebookExecutionJob. + ignore_read: true description: 'Configuration for a Workbench Instances-based environment.' properties: - name: customContainerImage diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index 6981c4b67f1c..00df309e14db 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -62,7 +62,7 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { workbench_runtime { custom_container_image { - repository = "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/base-cu113.py310" + repository = "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/base-cpu.py310" tag = "latest" } } diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl index f7dd0d442077..14bd59fff3d1 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl @@ -1,3 +1,8 @@ +data "google_compute_image" "my_image" { + family = "workbench-instances" + project = "cloud-notebooks-managed" +} + resource "google_storage_bucket" "output_bucket" { name = "{{index $.ResourceIdVars "bucket"}}" location = "US" @@ -63,7 +68,7 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { workbench_runtime { vm_image { project = "cloud-notebooks-managed" - name = "workbench-instances-v20230925" + name = data.google_compute_image.my_image.name } } From eee19b6a231f19b7dc644663dc670ac56264410b Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Fri, 31 Jul 2026 09:06:45 -0700 Subject: [PATCH 7/9] Increased create timeout & hardcoded valid image name --- mmv1/products/colab/NotebookExecution.yaml | 4 ++++ ...ab_notebook_execution_workbench_runtime_vm_name.tf.tmpl | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index c220cb9d17b5..fb6adea024bb 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -24,6 +24,10 @@ base_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs' self_link: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs/{{notebook_execution_job_id}}' immutable: true create_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs?notebook_execution_job_id={{notebook_execution_job_id}}' +timeouts: + insert_minutes: 60 + update_minutes: 20 + delete_minutes: 20 async: type: 'OpAsync' operation: diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl index 14bd59fff3d1..d14fb81fd016 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime_vm_name.tf.tmpl @@ -1,8 +1,3 @@ -data "google_compute_image" "my_image" { - family = "workbench-instances" - project = "cloud-notebooks-managed" -} - resource "google_storage_bucket" "output_bucket" { name = "{{index $.ResourceIdVars "bucket"}}" location = "US" @@ -68,7 +63,7 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { workbench_runtime { vm_image { project = "cloud-notebooks-managed" - name = data.google_compute_image.my_image.name + name = "workbench-instances-v20260713" } } From efa570b2e0ddece709f1ebf22729dd28d7b2e5a9 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Fri, 31 Jul 2026 12:53:19 -0700 Subject: [PATCH 8/9] Added labels field and changed custom container image repository --- mmv1/products/colab/NotebookExecution.yaml | 3 +++ .../colab_notebook_execution_workbench_runtime.tf.tmpl | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index fb6adea024bb..2eb6612ba54c 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -322,3 +322,6 @@ properties: - execution_user - service_account description: 'The service account to run the execution as.' + - name: 'labels' + type: KeyValueLabels + description: 'The labels with user-defined metadata to organize your NotebookExecutions.' diff --git a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl index 00df309e14db..1abb9a138e0b 100644 --- a/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/colab/colab_notebook_execution_workbench_runtime.tf.tmpl @@ -62,7 +62,7 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { workbench_runtime { custom_container_image { - repository = "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/base-cpu.py310" + repository = "gcr.io/deeplearning-platform-release/base-cpu.py310" tag = "latest" } } @@ -71,6 +71,10 @@ resource "google_colab_notebook_execution" "{{$.PrimaryResourceId}}" { service_account = "{{index $.TestEnvVars "service_account"}}" + labels = { + "foo" = "bar" + } + depends_on = [ google_storage_bucket.output_bucket, ] From f8d50525096bbaeea692d9895e17b94eef81949d Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Fri, 31 Jul 2026 13:46:16 -0700 Subject: [PATCH 9/9] Removed timeouts overrides --- mmv1/products/colab/NotebookExecution.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mmv1/products/colab/NotebookExecution.yaml b/mmv1/products/colab/NotebookExecution.yaml index 2eb6612ba54c..8f636049574e 100644 --- a/mmv1/products/colab/NotebookExecution.yaml +++ b/mmv1/products/colab/NotebookExecution.yaml @@ -24,10 +24,6 @@ base_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs' self_link: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs/{{notebook_execution_job_id}}' immutable: true create_url: 'projects/{{project}}/locations/{{location}}/notebookExecutionJobs?notebook_execution_job_id={{notebook_execution_job_id}}' -timeouts: - insert_minutes: 60 - update_minutes: 20 - delete_minutes: 20 async: type: 'OpAsync' operation: