turbot/gcp_insights

Query: dns_policies_for_compute_network

Usage

powerpipe query gcp_insights.query.dns_policies_for_compute_network

SQL

select
p.id::text as policy_id
from
gcp_dns_policy p,
jsonb_array_elements(p.networks) pn,
gcp_compute_network n
where
pn ->> 'networkUrl' = n.self_link
and n.id = (split_part($1, '/', 1))::bigint
and n.project = split_part($1, '/', 2);