turbot/gcp_insights

Query: kubernetes_clusters_for_compute_subnetwork

Usage

powerpipe query gcp_insights.query.kubernetes_clusters_for_compute_subnetwork

SQL

select
c.id::text || '/' || c.project as cluster_id
from
gcp_kubernetes_cluster c,
gcp_compute_subnetwork s
where
s.id = (split_part($1, '/', 1))::bigint
and s.project = split_part($1, '/', 2)
and s.self_link like '%' || (c.network_config ->> 'Subnetwork') || '%';