Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see which IP address Google Cloud Function instance use?

I want to see the IP address of my google function instance. I've tried to look request object's headers but couldn't find anything useful. Is there any way to find it?

I am using python SDK but I don't think this is language dependent.

like image 540
Cagri Uysal Avatar asked Sep 06 '25 03:09

Cagri Uysal


1 Answers

Cloud Functions do not have a public IP address assigned to the function.

Cloud Function egress traffic is routed to a proxy which then forwards the traffic to the public Internet. The only method to determine the current public IP address is to call a public endpoint which returns the public IP address of the frontend to Cloud Functions.

Here is an example endpoint: https://api64.ipify.org/?format=json

like image 153
John Hanley Avatar answered Sep 07 '25 19:09

John Hanley