turbot/gcp_insights

Query: compute_backend_services_for_compute_instance_group

Usage

powerpipe query gcp_insights.query.compute_backend_services_for_compute_instance_group

SQL

select
bs.id::text as service_id
from
gcp_compute_instance_group g,
gcp_compute_backend_service bs,
jsonb_array_elements(bs.backends) b
where
b ->> 'group' = g.self_link
and g.id = (split_part($1, '/', 1))::bigint
and g.project = split_part($1, '/', 2);