turbot/gcp_insights

Query: sql_database_instances_for_compute_network

Usage

powerpipe query gcp_insights.query.sql_database_instances_for_compute_network

SQL

select
i.self_link as self_link
from
gcp_sql_database_instance i,
gcp_compute_network n
where
n.self_link like '%' || (i.ip_configuration ->> 'privateNetwork') || '%'
and n.id = (split_part($1, '/', 1))::bigint
and n.project = split_part($1, '/', 2);