Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for new Cloud Functions Storage trigger events #1179

Closed
ssaqua opened this issue Mar 11, 2018 · 4 comments
Closed

Support for new Cloud Functions Storage trigger events #1179

ssaqua opened this issue Mar 11, 2018 · 4 comments
Labels

Comments

@ssaqua
Copy link
Contributor

ssaqua commented Mar 11, 2018

The current providers/cloud.storage/eventTypes/object.change trigger event type is marked as legacy with new finer-grained storage triggers available:

  • google.storage.object.finalize
  • google.storage.object.delete
  • google.storage.object.archive
  • google.storage.object.metadataUpdate

https://cloud.google.com/functions/docs/calling/storage#legacy_cloud_storage_triggers

After February 28, the legacy event type will only receive the object finalize event. It would be great to get support for these new event types although I suspect it would need a new option on the cloudfunctions resource.

Snippets from GCP email I received highlighting these changes:

New more powerful storage triggers
We've heard your feedback and have introduced finer grained storage triggers that allow developers to invoke functions on only a subset of Cloud Storage change events as opposed to responding to all changes on a bucket. For example, you can now write a Cloud Function that only executes when a file is created or one that only executes when a file is deleted. See our documentation to learn more about how to use these new triggers.

Google Cloud Storage triggers
Google Cloud storage triggers will use the new finer grained event types mentioned above. As a result, the format of the events will change, and the behavior of the 'gcloud beta functions deploy --trigger-bucket' command will be changing shortly to use the new triggers. After February 28, 2018, deploying a new function with this command will no longer cause it to receive Cloud Storage object change notifications. Instead, it will cause your function to only trigger on OBJECT_FINALIZE events--when a new file is created.

What happens to my running functions?
Your running functions will not be affected by either of these changes at this time. They will continue to receive events as usual and with the current schema. These older, legacy event types, however, are no longer being actively supported and will remain in beta indefinitely.

What if I want to update one of my functions that is using a legacy event type?
After February 28, 2018, attempting to update a function that is using a legacy event type via the --trigger-bucket or --trigger-topic flag in gcloud will not succeed. If you want to update one of your existing functions, we have preserved the legacy Cloud Storage and legacy Pub/Sub events. These will allow you to continue to maintain your code even after the gcloud SDK behavior is changed to take advantage of the new Cloud Storage and Cloud Pub/Sub events.

Terraform Version

v0.11.3

Affected Resource(s)

  • google_cloudfunctions_function
@naseemkullah
Copy link

bump

@paddycarver
Copy link
Contributor

Is this not resolved by #2158, released in 1.19.0?

@rileykarson
Copy link
Collaborator

Fixed by GoogleCloudPlatform/magic-modules#692

@ghost
Copy link

ghost commented Apr 5, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 5, 2019
@ghost ghost removed the waiting-response label Apr 5, 2019
@github-actions github-actions bot added service/cloudfunctions forward/review In review; remove label to forward labels Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants