Firebase Cloud Functions without Cloud Storage

戏子无情 提交于 2021-02-05 08:40:38

问题


I am not sure how technical this question is, but posting it here to request help from firebase / google cloud experts can help me. I have started with cloud functions in Aug 2020 and was able to successfully deploy cloud functions and test without the need for cloud storage. But yesterday I observed that on Sep 17th, 2020, 2 buckets were created in cloud storage and I have been billed for these buckets. There was no change in the way I deployed the cloud functions nor was there any change that I was aware of, to the account.

The service that created the buckets is service-xxxx@gcf-admin-robot.iam.gserviceaccount.com and the buckets created were:

  1. gcf-sources-xxxx-us-central1
  2. us.artifacts.abc.appspot.com

If this service and the buckets are deleted, then I am not able to deploy the functions with the error:

Deployment error. Error when configuring GCS bucket gcf-sources-xxxx-us-central1 in project ABC. Cause: service-xxxx@gcf-admin-robot.iam.gserviceaccount.com does not have storage.buckets.create access to the Google Cloud project.

If I add the service back, then the buckets are getting created, and am able to deploy the functions.

Are cloud storage buckets necessary for cloud functions to work? If not, how can I go back to where I was before these changes occurred. Please guide me.


回答1:


These buckets and their contents are created by Cloud Build, and the Container Registry that is uses internally. Cloud Build is used for Cloud Functions that use Node.js 10 or a later engine.

If you don't want these artifacts to be created you can for the moment still instruct Cloud Functions to deploy/run with Node.js 8. This ability will however disappear in Q1 2021, at which point the new build process is the only way to deploy Cloud Functions.

I recommend reading the FAQ on Cloud Functions pricing for full details on this change.



来源:https://stackoverflow.com/questions/64075335/firebase-cloud-functions-without-cloud-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!