01 Run projects list command (Windows/macOS/Linux) using custom query filters to list the IDs of all the Google Cloud Platform (GCP) projects available in your Google Cloud account:
gcloud projects list
--format="table(projectId)"
02 The command output should return the requested GCP project identifiers (IDs):
PROJECT_ID
cc-project5-stack-123123
cc-bigdata-project-112233
03 Run compute url-maps list command (Windows/macOS/Linux) using the ID of the GCP project that you want to examine as the identifier parameter and custom query filters to describe the name of each load balancer (identified by an URL map) created for the selected project:
gcloud compute url-maps list
--project cc-project5-stack-123123
--format="table(name)"
04 The command output should return the name(s) of the existing load balancer(s):
NAME
cc-project5-web-load-balancer
cc-project5-int-load-balancer
05 Run compute url-maps describe command (Windows/macOS/Linux) using the name of the GCP load balancer that you want to examine as the identifier parameter and custom query filters to describe the resource URL of the backend service associated with the selected load balancer:
gcloud compute url-maps describe cc-project5-web-load-balancer
--format="value(defaultService)"
06 The command output should return the requested resource URL:
https://www.googleapis.com/compute/v1/projects/cc-project5-stack-123123/global/backendServices/cc-project5-web-backend-service
07 Run compute backend-services describe command (Windows/macOS/Linux) using the URL of the associated backend service that you want to examine as the identifier parameter and custom output filtering to describe the logging configuration status available for the selected backend service:
gcloud compute backend-services describe https://www.googleapis.com/compute/v1/projects/cc-project5-stack-123123/global/backendServices/cc-project5-web-backend-service
--format="value(logConfig.enable)"
08 The command output should return the logging status set for the selected resource (True for enabled, False for disabled):
If the
compute backend-services describe command output returns
False, as shown in the example above, the selected Google Cloud HTTP(S) load balancer is not configured to log all network traffic.
09 Repeat steps no. 5 – 8 for each load balancer created for the selected GCP project.
10 Repeat steps no. 3 – 9 for each project deployed in your Google Cloud Platform (GCP) account.