Hi everyone,
I’m facing an issue with my Google Cloud Functions and would really appreciate some guidance.
- I’m currently using GCP’s trial/free tier.
- I have a Cloud Function that is triggered by an unauthenticated HTTP request. The function calls to check the IP address being used for its execution.
- The function then returns the country where it is executed from (i.e., the server’s location, not the caller’s location).
The Problem:
No matter which region I select for the function deployment (even when I select a region like Europe or specifically France), the function always seems to execute from the US. For instance, when I check the public IP, it resolves to a US-based server.
What I Need:
I want to ensure that my Cloud Function executes from a specific country, such as France or the UK, and that the IP reflects this location.
My Questions:
- Why is my function consistently executing from the US, even when I select a different region during deployment?
- How can I guarantee that my function executes from a specific region, like France or the UK, using only the free tier if possible?
- Is there a way to enforce this without resorting to a VPC and Cloud NAT (since this setup might incur extra costs)?
- Could this issue be related to me using a trial account, and would upgrading help?
Extra Info:
I know that using a VPC with Cloud NAT and static IP could work, but I’m looking for the simplest solution that would still allow me to control the region from which the function executes.
Thank you in advance for your help!