turbot/gcp_insights

Query: compute_networks_for_compute_instance_group

Usage

powerpipe query gcp_insights.query.compute_networks_for_compute_instance_group

SQL

select
n.id::text || '/' || n.project as network_id
from
gcp_compute_instance_group g
left join gcp_compute_subnetwork s on g.subnetwork = s.self_link,
gcp_compute_network n
where
g.network = n.self_link
and g.id = (split_part($1, '/', 1))::bigint
and g.project = split_part($1, '/', 2);