Internet NEG backends must not have a health check
See original GitHub issuePulumi attempts to enforce the healthChecks field on the compute.BackendService resource but this field must not be passed to the GCP API in certain circumstances.
// The following infrastructure is used so that we can use Cloud CDN with Cloud Functions.
const cloudFunctionsNEG = new gcp.compute.GlobalNetworkEndpointGroup(
'cloud-functions',
{
networkEndpointType: 'INTERNET_FQDN_PORT',
},
{ provider: gcpProvider },
)
const cloudFunctionsNE = new gcp.compute.GlobalNetworkEndpoint(
'cloud-functions',
{
globalNetworkEndpointGroup: cloudFunctionsNEG.name,
fqdn: `us-central1-${project}.cloudfunctions.net`,
port: 443, // HTTPS
},
{ provider: gcpProvider },
)
const cloudFunctionsBS = new gcp.compute.BackendService(
'cloud-functions',
// @ts-expect-error: `healthChecks` is required by Pulumi but backend services with
// internet NEG backends must not have a health check according to GCP docs.
//
// See https://cloud.google.com/compute/docs/reference/rest/v1/backendServices
{
backends: [{ group: cloudFunctionsNEG.id }],
enableCdn: true,
protocol: 'HTTPS',
},
{ provider: gcpProvider },
)
Unfortunately the @ts-expect-error directive doesn’t help here since the SDK checks the field at runtime.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Internet network endpoint groups overview | Load Balancing
A backend service with an internet NEG doesn't support a health check. Google Cloud doesn't provide health checking for any external backend.
Read more >Make `health_check` optional to support internet/global NEG ...
The requirement that a group have a health check is a blocker. ... Internet NEG backends must not have a health check pulumi/pulumi-gcp#380....
Read more >How to troubleshoot unhealthy backends in Google Cloud ...
Check out this video to learn the concepts - unhealthy backend, health checks and its importance, criteria for load balancer marking the ...
Read more >Troubleshoot your Network Load Balancer
The HTTP host header in the health check request contains the IP address of the load balancer node and the listener port, not...
Read more >NEGs with Load Balancer on GKE - Gabriel Hodoroaga
In this tutorial I will show you how to expose you application to the internet using the Cloud Load Balancing and NEGs (Network...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Never mind. Figured out the issue. I was mistakenly using
gcp.compute.NetworkEndpointGroupinstead ofgcp.compute.GlobalNetworkEndpointGroup.The following works as expeceted:
Looks like this is tracked upstream in https://github.com/terraform-google-modules/terraform-google-lb-http/issues/105 and once that’s fixed should get picked up with the next pulumi-gcp update.