Hi,
We are currently working on configuring a Google Cloud HTTPS Load Balancer in front of an API Gateway using a Serverless NEG (Network Endpoint Group). We're using Terraform with the google-beta provider and have implemented the serverless_deployment block to target the API Gateway, following the official documentation.
The terraform apply command runs without any errors, but when we inspect the created NEG, no endpoints are attached. As a result, the Load Balancer is unable to route traffic to the API Gateway.
To rule out Terraform-specific issues, we also attempted to manually create the Serverless NEG using the gcloud CLI in a shell script .While the command executes successfully and the NEG appears in the console, it still shows no endpoints, and the API Gateway does not appear to be connected.
At this point, we are unsure whether this is a platform limitation, a propagation delay, or a misconfiguration. We'd appreciate any guidance or clarification on:
Whether Serverless NEGs for API Gateway are fully supported and functional at this time as at a moment Google Cloud documentation says its in Preview stage
Any known issues or prerequisites (e.g., region compatibility, required API Gateway state)
Recommendations on how to verify or troubleshoot endpoint registration for Serverless NEGs
Thanks in advance for your help!
Hi @rajat5,
Welcome to Google Cloud Community
Serverless NEGs don't have any network endpoints such as ports or IP addresses. They can only point to a Google-hosted serverless backend Cloud Run, App Engine, API Gateway, or Cloud Run functions resource residing in the same region as the NEG.
You can check the tutorial on how to create a Load Balancer for API Gateway, you will also see in the document on how to test your load balancer configuration. Also check the limitation on serverless NEGs and API Gateway.
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi @kensan
We have tried this solution but it didn't work. Beta Serverless NEG with API gateway endpoint will create empty Endpoint group. We have tried using CLI and terraform in both scenario NEG with empty endpoint got created. Could you please help us how to use serverless NEG with API gateway?