Using gen1 it looks like this
gcloud functions deploy AuthUserCreate --runtime dotnet6 --no-gen2 --entry-point AuthUserHandler --trigger-event providers/firebase.auth/eventTypes/user.create
but a) .net 6.0 is not supported anymore and b) I would like to use gen2.
I tried
gcloud functions deploy AuthUserCreate --runtime dotnet8 --gen2 --entry-point AuthUserHandler --trigger-event providers/firebase.auth/eventTypes/user.create
but got
ERROR: (gcloud.functions.deploy) Invalid value for [--trigger-event]:
Event type providers/firebase.auth/eventTypes/user.create
is not supported by this flag, try using --trigger-event-filters.
What is the correct trigger-event-filters?
Using
gcloud functions deploy AuthUserCreate --runtime dotnet8 --gen2 --entry-point AuthUserHandler --trigger-event-filters=type=providers/firebase.auth/eventTypes/user.create
gives
ERROR: (gcloud.functions.deploy) ResponseError: status=[400], code=[Ok],
message=
[...
The request was invalid:
invalid value for attribute 'type' in trigger.event_filters:
...
event_filters:
{
attribute:\"type\"
value:\"providers/firebase.auth/eventTypes/user.create\"
}
...]
Firebase Authentication triggers currently don't support v2, so what you're trying to do isn't possible yet. See the prominent note in the documentation for Firebase Auth triggers:
Note: Cloud Functions for Firebase (2nd gen) does not provide support for the events and triggers described in this guide. Because 1st gen and 2nd gen functions can coexist side-by-side in the same source file, you can still develop and deploy this functionality together with 2nd gen functions.
This is going to be true no matter which set of tools you're using to deploy the trigger (Firebase CLI or gcloud).