I'm trying to send traffic from a Google Cloud Load Balancer (LB) directly to a Cloud Function.
My Cloud Function has an HTTP URL trigger
and if I hit that URL from a browser it works, so all I need is a rule on the load balancer to proxy that URL.
So the setup would be:
Load Balancer -> Cloud Function -> Cloud Storage
However from looking at the LB backend configuration, it seems that the only allowed options are either a service (eg a Virtual Machine) or a Bucket (ie Cloud Storage):
load balancer config screenshot
Am I missing something or is there simply no way of sending traffic directly from a Cloud Load Balancer to a Cloud Function?
Best Answer
For future readers, as of July 2020, the HTTPS Load Balancer can now handle routing to Cloud Function, Cloud Run & AppEngine. See below announcement from Google:
https://cloud.google.com/blog/products/networking/better-load-balancing-for-app-engine-cloud-run-and-functions