turbot/gcp_insights

Query: sql_database_instance_public_access_status

Usage

powerpipe query gcp_insights.query.sql_database_instance_public_access_status

SQL

select
public_access_status,
count(*)
from (
select name,
case when ip_configuration -> 'authorizedNetworks' @> '[{"name": "internet", "value": "0.0.0.0/0"}]' then
'enabled'
else
'disabled'
end public_access_status
from
gcp_sql_database_instance) as c
group by
public_access_status
order by
public_access_status;

Dashboards

The query is used in the dashboards: