turbot/gcp_insights

Query: compute_instance_group_attached_instances

Usage

powerpipe query gcp_insights.query.compute_instance_group_attached_instances

SQL

select
i.id::text as "ID",
i.name as "Name",
i.creation_timestamp as "Create Time",
i.cpu_platform as "CPU Platform",
i.status as "Status"
from
gcp_compute_instance_group g,
jsonb_array_elements(instances) as ins,
gcp_compute_instance i
where
g.id = (split_part($1, '/', 1))::bigint
and g.project = split_part($1, '/', 2)
and i.self_link = ins ->> 'instance';

Dashboards

The query is used in the dashboards: