turbot/digitalocean_insights

Query: database_clusters_for_kubernetes_cluster

Usage

powerpipe query digitalocean_insights.query.database_clusters_for_kubernetes_cluster

SQL

select
d.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 k.urn = $1;