From 413f611872e458944f6df88a341f82a589682c04 Mon Sep 17 00:00:00 2001 From: Deepak Kumar Date: Thu, 15 Feb 2024 14:19:26 +0100 Subject: [PATCH 1/2] fixes: permadiff issue if event trigger region is not specified - fixes https://github.com/hashicorp/terraform-provider-google/issues/17161 --- mmv1/products/cloudfunctions2/Function.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/mmv1/products/cloudfunctions2/Function.yaml b/mmv1/products/cloudfunctions2/Function.yaml index a094196586fc..71fd0ef07e87 100644 --- a/mmv1/products/cloudfunctions2/Function.yaml +++ b/mmv1/products/cloudfunctions2/Function.yaml @@ -594,6 +594,7 @@ properties: events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function. + default_from_api: true - !ruby/object:Api::Type::String name: 'eventType' description: 'Required. The type of event to observe.' From dc48d741f67f13d8bc6bcb11e1e3efd817dfbaac Mon Sep 17 00:00:00 2001 From: Deepak Kumar Date: Tue, 20 Feb 2024 08:56:44 +0100 Subject: [PATCH 2/2] chore: Updated cloudfunction2 test with no explicit trigger_region --- .../terraform/examples/cloudfunctions2_basic_gcs.tf.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/mmv1/templates/terraform/examples/cloudfunctions2_basic_gcs.tf.erb b/mmv1/templates/terraform/examples/cloudfunctions2_basic_gcs.tf.erb index 8dd602fc4c5f..00a11528241d 100644 --- a/mmv1/templates/terraform/examples/cloudfunctions2_basic_gcs.tf.erb +++ b/mmv1/templates/terraform/examples/cloudfunctions2_basic_gcs.tf.erb @@ -91,7 +91,6 @@ resource "google_cloudfunctions2_function" "<%= ctx[:primary_resource_id] %>" { } event_trigger { - trigger_region = "us-central1" # The trigger must be in the same location as the bucket event_type = "google.cloud.storage.object.v1.finalized" retry_policy = "RETRY_POLICY_RETRY" service_account_email = google_service_account.account.email