从头开始重新初始化 Cloud Functions

时间:2020-12-31 19:02:22

标签: firebase google-cloud-functions google-cloud-storage

在遇到与 this question 中的 OP 相同的问题后,Google 账单支持代理建议我删除由部署我的 Firebase 函数启动的 CloudBuild 进程创建的存储桶。

但是,当我尝试部署(函数名称已更改)时,我现在收到以下错误:

⚠  functions[function1(us-central1)]: Deployment error.
Build failed: could not resolve storage source: googleapi: Error 404: Not Found, notFound
⚠  functions[function2(us-central1)]: Deployment error.
Build failed: could not resolve storage source: googleapi: Error 404: Not Found, notFound
⚠  functions[function3(us-central1)]: Deployment error.

我不知道原始存储桶的名称,因此无法重新创建它。我已尝试再次寻求支持,但他们无济于事,因为这不再是结算问题。

有没有办法让 Functions 重新创建存储桶,以便我可以恢复部署?

1 个答案:

答案 0 :(得分:1)

@Oru 中的 this answer 所述,有必要为具有以下模式的名称的函数重新创建存储桶:gcf-sources-<PROJECT_NUMBER>-<REGION>

对于 Firebase 功能与我的一样,提示时它应该是多区域的,并且 <REGION> 应该与错误中显示的相同消息(在我的情况下为 us-central1)。