I have some "Classic" HTTP load balancers in my GCP project. Now I need to switch the health check used in one of the backend services.
Here you see in the GUI what I want to do:
However, as you can see, I got a warning not to change anything via GUI.
So, how do I do this via the gcloud command line tool? Could not find any hint in the docs, unfortunately.
Or can I ignore this warning and just go ahead?
This warning can be ignored. In case if the health check
is not updated then follow these steps to update the health check through gcloud commands.
If you know the name of the backend service which you are trying to update the health check, you can use the following command:
gcloud compute backend-services update BACKEND_SERVICE_NAME \
--region=REGION \
--health-checks=HEALTH_CHECK_NAME \
--health-checks-region=REGION
Refer this document for more information about the backend-service update command.
In case you don't know the name of the backend-services attached to the load balancer follow this document to get the list of backend services used by the load balancer. By using the backend service name we can update the health check through gcloud command line tool.