turbot/gcp_insights

Query: sql_database_instance_public_access_count

Usage

powerpipe query gcp_insights.query.sql_database_instance_public_access_count

SQL

select
count(*) as value,
'Public Access Enabled' as label,
case count(*) when 0 then 'ok' else 'alert' end as "type"
from
gcp_sql_database_instance
where
ip_configuration -> 'authorizedNetworks' @> '[{"name": "internet", "value": "0.0.0.0/0"}]';

Dashboards

The query is used in the dashboards: