0

While creating a project, I selected the region asia-south1, but I am surprised when I deploy the functions URL started from us-central1

I want to know, What is the current region for my firebase function, I want to set it as asia-south1.

Any help will be appreciable.

Thanks.

1 Answer 1

3

You can find how to change a GCF region in the Firebase documentation:

By default, functions run in the us-central1 region. Note that this may be different from the region of an event source, such as a Cloud Storage bucket. If you need to change the region where a function runs, follow the recommendations in this section for each function trigger type.

To set the region where a function runs, set the region parameter in the function definition as shown:

exports.myStorageFunction = functions
    .region('asia-south1')
    .storage
    .object()
    .onFinalize((object) => {
      // ...
    });

You can specify multiple regions by passing multiple comma-separated region strings in functions.region().

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for answering, I want to know why my URL started from us-central1 even my GCF location is asia-south1 ?
Because as the doc states, by default, functions run in the us-central1 region, regardless your project location.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.