turbot/gcp_insights

Query: compute_instances_for_compute_disk

Usage

powerpipe query gcp_insights.query.compute_instances_for_compute_disk

SQL

select
i.id::text || '/' || i.project as instance_id
from
gcp_compute_disk d,
gcp_compute_instance i,
jsonb_array_elements(disks) as disk
where
d.self_link = (disk ->> 'source')
and d.id = (split_part($1, '/', 1))::bigint
and d.project = split_part($1, '/', 2);