From 414d6bee6501a5d143222e5412dcfef100e9cd61 Mon Sep 17 00:00:00 2001 From: bcreddy-gcp <123543489+bcreddy-gcp@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:54:59 +0530 Subject: [PATCH] Label support for Google Managed Notebooks (#9625) --- mmv1/products/notebooks/Runtime.yaml | 9 +++++++++ .../terraform/examples/notebook_runtime_kernels.tf.erb | 3 +++ .../terraform/examples/notebook_runtime_script.tf.erb | 3 +++ 3 files changed, 15 insertions(+) diff --git a/mmv1/products/notebooks/Runtime.yaml b/mmv1/products/notebooks/Runtime.yaml index 721822b3e8e1..7657f51a0c95 100644 --- a/mmv1/products/notebooks/Runtime.yaml +++ b/mmv1/products/notebooks/Runtime.yaml @@ -569,3 +569,12 @@ properties: sessions stats. output: true output: true + - !ruby/object:Api::Type::KeyValueLabels + name: 'labels' + description: | + The labels to associate with this runtime. Label **keys** must + contain 1 to 63 characters, and must conform to [RFC 1035] + (https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be + empty, but, if present, must contain 1 to 63 characters, and must + conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No + more than 32 labels can be associated with a cluster. diff --git a/mmv1/templates/terraform/examples/notebook_runtime_kernels.tf.erb b/mmv1/templates/terraform/examples/notebook_runtime_kernels.tf.erb index d97313a6bbff..1db5a97fe1b8 100644 --- a/mmv1/templates/terraform/examples/notebook_runtime_kernels.tf.erb +++ b/mmv1/templates/terraform/examples/notebook_runtime_kernels.tf.erb @@ -22,4 +22,7 @@ resource "google_notebooks_runtime" "<%= ctx[:primary_resource_id] %>" { } } } + labels = { + k = "val" + } } diff --git a/mmv1/templates/terraform/examples/notebook_runtime_script.tf.erb b/mmv1/templates/terraform/examples/notebook_runtime_script.tf.erb index d9320d924dbd..5dcb7e218896 100644 --- a/mmv1/templates/terraform/examples/notebook_runtime_script.tf.erb +++ b/mmv1/templates/terraform/examples/notebook_runtime_script.tf.erb @@ -19,4 +19,7 @@ resource "google_notebooks_runtime" "<%= ctx[:primary_resource_id] %>" { } } } + labels = { + k = "val" + } }