I'm trying to deploy a cloud function via my local terminal. For this i use the following code:
gcloud beta functions deploy networkcheck \
--region=europe-west1 \
--project=project-id \
--entry-point functionName \
--trigger-event providers/cloud.firestore/eventTypes/document.write \
--trigger-resource projects/project-id/databases/(default)/documents/test/test_id \
--runtime nodejs8
This will result in the following error:
deploy.sh: line 7: syntax error near unexpected token `('
deploy.sh: line 7: ` --trigger-resource projects/project-id/databases/(default)/documents/test/test_id \'
The script executes perfectly fine when i change '(default)' to 'default or any other string'. But then the cloud function will not work, because the only id that can be used for an Firestore database is '(default)', as mentioned in this post: How to find the database id of a cloud firestore project?
Is this a bug? Or can i fix this somehow?