【发布时间】:2019-02-24 22:30:32
【问题描述】:
我正在尝试通过本地终端部署云功能。为此,我使用以下代码:
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
这将导致以下错误:
deploy.sh: line 7: syntax error near unexpected token `('
deploy.sh: line 7: ` --trigger-resource projects/project-id/databases/(default)/documents/test/test_id \'
当我将“(默认)”更改为“默认或任何其他字符串”时,脚本执行得非常好。但是云功能将不起作用,因为可以用于 Firestore 数据库的唯一 id 是“(默认)”,如本文所述:How to find the database id of a cloud firestore project?
这是一个错误吗?或者我可以以某种方式解决这个问题吗?
【问题讨论】:
标签: google-cloud-firestore google-cloud-functions gcloud