Skip to content

Commit 51f6470

Browse files
fixes: permadiff issue if event trigger region is not specified (#9989) (#6991)
* fixes: permadiff issue if event trigger region is not specified - fixes hashicorp/terraform-provider-google#17161 * chore: Updated cloudfunction2 test with no explicit trigger_region [upstream:02e719917fd193513b3e580493a2df4e051cafc9] Signed-off-by: Modular Magician <[email protected]>
1 parent 4e9eeb9 commit 51f6470

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

.changelog/9989.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
cloudfunctions2: fixed an issue where not specifying `event_config.trigger_region` in `google_cloudfunctions2_function` resulted in a permanent diff. The field now pulls a default value from the API when unset.
3+
```

google-beta/services/cloudfunctions2/resource_cloudfunctions2_function.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Compute Engine default service account: {project_number}[email protected]
257257
},
258258
"trigger_region": {
259259
Type: schema.TypeString,
260+
Computed: true,
260261
Optional: true,
261262
Description: `The region that the trigger will be in. The trigger will only receive
262263
events originating in this region. It can be the same

google-beta/services/cloudfunctions2/resource_cloudfunctions2_function_generated_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ resource "google_cloudfunctions2_function" "function" {
330330
}
331331
332332
event_trigger {
333-
trigger_region = "us-central1" # The trigger must be in the same location as the bucket
334333
event_type = "google.cloud.storage.object.v1.finalized"
335334
retry_policy = "RETRY_POLICY_RETRY"
336335
service_account_email = google_service_account.account.email

website/docs/r/cloudfunctions2_function.html.markdown

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ resource "google_cloudfunctions2_function" "function" {
323323
}
324324
325325
event_trigger {
326-
trigger_region = "us-central1" # The trigger must be in the same location as the bucket
327326
event_type = "google.cloud.storage.object.v1.finalized"
328327
retry_policy = "RETRY_POLICY_RETRY"
329328
service_account_email = google_service_account.account.email

0 commit comments

Comments
 (0)