From daed209496b505f68a34443fb0c39c5f955b2333 Mon Sep 17 00:00:00 2001 From: rahul yadav Date: Mon, 3 Mar 2025 15:55:14 +0530 Subject: [PATCH 1/4] chore: add spanner connection metadata --- modules/instance_template/metadata.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 1764bea8..17a80bf4 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -287,6 +287,12 @@ spec: version: ">= 4.4" spec: outputExpr: "{\"SERVICE_ACCOUNT_EMAIL\" : email, \"SERVICE_ACCOUNT_IAM_EMAIL\" : iam_email}" + - source: + source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner + version: ">= 1.1.1" + spec: + outputExpr: env_vars + inputPath: env_vars - name: service_account description: Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. varType: |- @@ -330,6 +336,11 @@ spec: version: ">= 17.1.0" spec: outputExpr: "[\"roles/aiplatform.user\"]" + - source: + source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner + version: ">= 1.1.1" + spec: + outputExpr: "[\"roles/spanner.databaseAdmin\"]" - name: enable_shielded_vm description: Whether to enable the Shielded VM configuration on the instance. Note that the instance image must support Shielded VMs. See https://cloud.google.com/compute/docs/images varType: bool From 7309c648443d1870ebfe1cbc39ef746a5e3f25ae Mon Sep 17 00:00:00 2001 From: rahul yadav Date: Mon, 3 Mar 2025 19:56:43 +0530 Subject: [PATCH 2/4] fix lint --- modules/instance_template/metadata.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 17a80bf4..c1fa1abd 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -287,12 +287,11 @@ spec: version: ">= 4.4" spec: outputExpr: "{\"SERVICE_ACCOUNT_EMAIL\" : email, \"SERVICE_ACCOUNT_IAM_EMAIL\" : iam_email}" - - source: - source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner - version: ">= 1.1.1" - spec: - outputExpr: env_vars - inputPath: env_vars + - source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner + version: ">= 1.1.1" + spec: + outputExpr: env_vars + inputPath: env_vars - name: service_account description: Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. varType: |- @@ -339,8 +338,8 @@ spec: - source: source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner version: ">= 1.1.1" - spec: - outputExpr: "[\"roles/spanner.databaseAdmin\"]" + spec: + outputExpr: "[\"roles/spanner.databaseAdmin\"]" - name: enable_shielded_vm description: Whether to enable the Shielded VM configuration on the instance. Note that the instance image must support Shielded VMs. See https://cloud.google.com/compute/docs/images varType: bool From 2f3526ca5c7e9ae77c8e8cfd80a63fbf4653e3f5 Mon Sep 17 00:00:00 2001 From: rahul yadav Date: Wed, 5 Mar 2025 13:09:08 +0530 Subject: [PATCH 3/4] fix lint --- modules/instance_template/metadata.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index c1fa1abd..03af5668 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -287,8 +287,9 @@ spec: version: ">= 4.4" spec: outputExpr: "{\"SERVICE_ACCOUNT_EMAIL\" : email, \"SERVICE_ACCOUNT_IAM_EMAIL\" : iam_email}" - - source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner - version: ">= 1.1.1" + - source: + source: github.com/GoogleCloudPlatform/terraform-google-cloud-spanner + version: ">= 1.1.1" spec: outputExpr: env_vars inputPath: env_vars From 73e860c9d079ab60d168ecdb231829f796653c6c Mon Sep 17 00:00:00 2001 From: rahul yadav Date: Wed, 5 Mar 2025 15:04:51 +0530 Subject: [PATCH 4/4] skip passing input_path --- modules/instance_template/metadata.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 03af5668..5d96ed1a 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -292,7 +292,6 @@ spec: version: ">= 1.1.1" spec: outputExpr: env_vars - inputPath: env_vars - name: service_account description: Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. varType: |-