turbot/gcp

steampipe plugin install gcpsteampipe plugin install gcp
On This Page
Get Involved

Table: gcp_compute_backend_service

A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to back-ends, various distribution and session settings, health checks, and timeouts.

Examples

Backend info of backend service

select
name,
id,
b ->> 'balancingMode' as balancing_mode,
split_part(b ->> 'group', '/', 10) as network_endpoint_groups
from
gcp_compute_backend_service,
jsonb_array_elements(backends) as b;

List of backend services where health check is not configured

select
name,
id,
self_link,
health_checks
from
gcp_compute_backend_service
where
health_checks is null;

List of backend services where connection draining timeout is less than 300 sec

select
name,
id,
connection_draining_timeout_sec
from
gcp_compute_backend_service
where
connection_draining_timeout_sec < 300;

List of backend services where logging is not enabled

select
name,
id,
log_config_enable
from
gcp_compute_backend_service
where
not log_config_enable;

.inspect gcp_compute_backend_service

GCP Compute Backend Service

NameTypeDescription
affinity_cookie_ttl_secbigintSpecifies the lifetime of the cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
backendsjsonbAn list of backends that serve this BackendService.
cdn_policy_cache_key_policyjsonbSpecifies the CacheKeyPolicy for this CdnPolicy.
circuit_breakersjsonbSettings controlling the volume of connections to a backend service.
connection_draining_timeout_secbigintSpecifies the amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
creation_timestamptimestamp without time zoneThe creation timestamp of the resource.
descriptiontextA user-specified, human-readable description of the backend service.
enable_cdnbooleanSpecifies whether the Cloud CDN is enabled for the backend service, or not.
failover_policyjsonbApplicable only to Failover for Internal TCP/UDP Load Balancing.
fingerprinttextAn unique system generated string, to reduce conflicts when multiple users change any property of the resource.
health_checksjsonbA list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service.
iapjsonbSpecifies the configurations for Identity-Aware Proxy on this resource.
idbigintThe unique identifier for the resource.
kindtextThe type of the resource.
load_balancing_schemetextSpecifies the type of the load balancer.
locality_lb_policytextSpecifies the load balancing algorithm used within the scope of the locality.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
location_typetextLocation type where the backend service resides.
log_config_enablebooleanSpecifies whether to enable logging for the load balancer traffic served by this backend service, or not.
log_config_sample_ratedouble precisionSpecifies the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
nametextA friendly name that identifies the resource.
networktextThe URL of the network to which this backend service belongs.
portbigintSpecifies the TCP port to connect on the backend. The default value is 80.
port_nametextA named port on a backend instance group representing the port for communication to the backend VMs in that group.
projecttextThe GCP Project in which the resource is located.
protocoltextSpecifies the protocol that the BackendService uses to communicate with backends.
regiontextThe URL of the region where the regional backend service resides. This field is not applicable to global backend services.
security_policytextThe resource URL for the security policy associated with this backend service.
security_settingsjsonbSpecifies the security policy that applies to this backend service.
self_linktextThe server-defined URL for the resource.
session_affinitytextSpecifies the type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP.
signed_url_cache_max_age_secbigintSpecifies the maximum number of seconds the response to a signed URL request will be considered fresh.
signed_url_key_namesjsonbA list of names of the keys for signing request URLs.
timeout_secbigintSpecifies the backend service timeout.
titletextTitle of the resource.