Skip to content

Commit

Permalink
fixes: permadiff issue if event trigger region is not specified (hash…
Browse files Browse the repository at this point in the history
…icorp#9989)

* fixes: permadiff issue if event trigger region is not specified

- fixes hashicorp#17161

* chore: Updated cloudfunction2 test with no explicit trigger_region

[upstream:02e719917fd193513b3e580493a2df4e051cafc9]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician committed Feb 20, 2024
1 parent cee0b2f commit 1e415d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/9989.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
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.
```
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ Compute Engine default service account: {project_number}[email protected]
},
"trigger_region": {
Type: schema.TypeString,
Computed: true,
Optional: true,
Description: `The region that the trigger will be in. The trigger will only receive
events originating in this region. It can be the same
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ resource "google_cloudfunctions2_function" "function" {
}
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
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/cloudfunctions2_function.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ resource "google_cloudfunctions2_function" "function" {
}
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
Expand Down

0 comments on commit 1e415d3

Please sign in to comment.