1
votes

My Firebase project uses several different storage buckets used by cloud function storage triggers. Although I can change the default bucket for a particular cloud storage function in the console or using CLI after deploying it, I was wondering if there was a way to configure these settings (bucket, memory limit, zip-deployment location) in firebase.json and pick them up automatically during deploy. Sometimes deployment of the entire project resets the cloud function settings, which causes issues for our users. Thanks!

1

1 Answers

1
votes

If you want to configure values to consume in your functions, use environment configuration.

From the CLI:

firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID"

Then in a function:

functions.config().someservice.key