1

We need to change the location for all of our cloud functions from 'us-central1' to ('us-central1', 'europe-west1')

We can go through every function manually and add .region('us-central1', 'europe-west1') but I wondered if there is a possibility to set the region globally to multiple regions for all cloud functions at once.

CaitlynCodr
  • 238
  • 1
  • 15

1 Answers1

0

You can change the region for all your firebase cloud functions as mentioned in the stackoverflow answer and You can also refer to the documentation1 and documentation2 where a brief explanation provided towards the best practice for changing the firebase Cloud functions as stated:

// before
const functions = require('firebase-functions');

exports.webhook = functions
    .https.onRequest((req, res) => {
            res.send("Hello");
    });

// after
const functions = require('firebase-functions');

exports.webhookAsia = functions
    .region('asia-northeast1')
    .https.onRequest((req, res) => {
            res.send("Hello");
    });
Divyani Yadav
  • 1,030
  • 4
  • 9