I recently deployed some previously gen1 functions to gen2, and I note that one of my functions that subscribes to the google.cloud.storage.object.v1.finalized event is not triggering when objects are uploaded to the bucket.
I deploy my gen2 functions using gcloud, and the command looks something like this:
gcloud functions deploy "exampleFn" \
--quiet \
--gen2 \
--entry-point="exampleFn" \
--project="..." \
--region="europe-west1" \
--runtime="nodejs22" \
--timeout="540s" \
--memory="2048Mi" \
--ingress-settings="internal-only" \
--trigger-resource="example-bucket" \
--trigger-location="eu" \
--trigger-event="google.cloud.storage.object.v1.finalized" \
--service-account="...@....iam.gserviceaccount.com" \
--update-labels="..." \
--source="..." \
--env-vars-file="..."
It seems the Eventarc trigger was created in relation to the above command, but I cannot for the life of me trigger the event when I upload files to the bucket.
The bucket resides in eu and the trigger location was set to eu — the function itself is in europe-west1, so I’m unsure if that’s an issue.
I also set ingress-settings to internal-only, so maybe that’s my problem, however I figured it should have worked considering it is Google turtles all the way down.