turbot/digitalocean_insights

Query: kubernetes_clusters_for_database_cluster

Usage

powerpipe query digitalocean_insights.query.kubernetes_clusters_for_database_cluster

SQL

select
k.urn as cluster_urn
from
digitalocean_database as d,
jsonb_array_elements(firewall_rules) as fr,
digitalocean_kubernetes_cluster as k
where
fr ->> 'type' = 'k8s'
and k.id::text = fr ->> 'value'
and d.urn = $1;