From 7081fe934d3f870d208077c886fdce260c5540c7 Mon Sep 17 00:00:00 2001 From: Ryan Oaks Date: Tue, 8 Sep 2026 15:55:23 +0000 Subject: [PATCH] Fix server generated batch_id in google_dataproc_batch --- mmv1/products/dataproc/Batch.yaml | 7 +++++-- .../samples/services/dataproc/dataproc_batch_spark.tf.tmpl | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mmv1/products/dataproc/Batch.yaml b/mmv1/products/dataproc/Batch.yaml index 6252dc74360d..20cec96f4746 100644 --- a/mmv1/products/dataproc/Batch.yaml +++ b/mmv1/products/dataproc/Batch.yaml @@ -37,6 +37,8 @@ timeouts: async: operation: base_url: '{{op_id}}' + result: + resource_inside_response: true autogen_async: true include_in_tgc_next: true custom_code: @@ -137,14 +139,15 @@ parameters: The location in which the batch will be created in. immutable: true url_param_only: true +properties: - name: batchId type: String description: | The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are /[a-z][0-9]-/. immutable: true - url_param_only: true -properties: + default_from_api: true + custom_flatten: templates/terraform/custom_flatten/id_from_name.tmpl - name: name type: String description: | diff --git a/mmv1/templates/terraform/samples/services/dataproc/dataproc_batch_spark.tf.tmpl b/mmv1/templates/terraform/samples/services/dataproc/dataproc_batch_spark.tf.tmpl index 1adee1b86050..757942158223 100644 --- a/mmv1/templates/terraform/samples/services/dataproc/dataproc_batch_spark.tf.tmpl +++ b/mmv1/templates/terraform/samples/services/dataproc/dataproc_batch_spark.tf.tmpl @@ -1,6 +1,4 @@ resource "google_dataproc_batch" "{{$.PrimaryResourceId}}" { - - batch_id = "tf-test-batch%{random_suffix}" location = "us-central1" labels = {"batch_test": "terraform"}