1

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 Answer 1

1

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
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.