turbot/gcp_insights

Query: compute_instance_groups_for_kubernetes_cluster

Usage

powerpipe query gcp_insights.query.compute_instance_groups_for_kubernetes_cluster

SQL

select
g.id :: text as group_id
from
gcp_kubernetes_node_pool p,
gcp_compute_instance_group g,
gcp_kubernetes_cluster c,
jsonb_array_elements_text(p.instance_group_urls) ig
where
p.cluster_name = c.name
and c.project = p.project
and split_part(ig, 'instanceGroupManagers/', 2) = g.name
and g.project = p.project
and c.id = $1;