I would like to develop a Google Cloud Function that will subscribe to file changes in a Google Cloud Storage bucket and upload the file to a third party FTP site. This FTP site requires allow-listed IP addresses of clients.
As such, it is possible to get a static IP address for Google Cloud Functions containers?
In general, Google Cloud charges for its Static IP service. However, there are some exceptions. For instance, students and faculty with an academic institution subscription are eligible for a discounted rate. Additionally, GCP offers a free trial of its Static IP service.
There is no charge for static or ephemeral internal IP addresses.
Go to the VPC networks page. Click the VPC network that you want to reserve the new static IP in. Click Static internal IP addresses and then click Reserve static address. Enter a Name for this IP address.
Requests from your Cloud Run service travel through your VPC network and reach external endpoints using the static IP address.
Update: This feature is now available in GCP https://cloud.google.com/functions/docs/networking/network-settings#associate-static-ip
First of all this is not an unreasonable request, don't get gaslighted. AWS Lambdas already support this feature and have for awhile now. If you're interested in this feature please star this feature request: https://issuetracker.google.com/issues/112629904
Secondly, we arrived at a work-around which I also posted to that issue as well, maybe this will work for you too:
A caveat to this approach:
I hope this is helpful.
Update: Just the other day, they announced an early-access beta for this exact feature!!
"Cloud Functions PM here. We actually have an early-access preview of this feature if you'd like to test it out.
Please complete this form so we can add you..."
The form can be found in the Issue linked above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With