turbot/gcp_compliance

Query: sql_instance_sql_user_connections_database_flag_configured

Usage

powerpipe query gcp_compliance.query.sql_instance_sql_user_connections_database_flag_configured

SQL

select
self_link resource,
case
when database_version not like 'SQLSERVER%' then 'skip'
when database_flags @> '[{"name":"user connections"}]' then 'ok'
else 'alarm'
end as status,
case
when database_version not like 'SQLSERVER%'
then title || ' not a SQL Server database.'
when database_flags @> '[{"name":"user connections"}]'
then title || ' ''user connections'' database flag set.'
else title || ' ''user connections'' database flag not set.'
end as reason
, location as location, project as project
from
gcp_sql_database_instance;

Controls

The query is being used by the following controls: