turbot/gcp_insights

Query: compute_resource_policies_for_compute_disk

Usage

powerpipe query gcp_insights.query.compute_resource_policies_for_compute_disk

SQL

select
r.id as policy_id
from
gcp_compute_disk d,
jsonb_array_elements_text(resource_policies) as rp,
gcp_compute_resource_policy r
where
d.id = (split_part($1, '/', 1))::bigint
and d.project = split_part($1, '/', 2)
and rp = r.self_link;