turbot/gcp_compliance

Query: sql_instance_sql_user_options_database_flag_not_configured

Usage

powerpipe query gcp_compliance.query.sql_instance_sql_user_options_database_flag_not_configured

SQL

select
self_link resource,
case
when database_version not like 'SQLSERVER%' then 'skip'
when database_flags @> '[{"name":"user options"}]' then 'alarm'
else 'ok'
end as status,
case
when database_version not like 'SQLSERVER%' then title || ' not a SQL Server database.'
when database_flags @> '[{"name":"user options"}]' then title || ' ''user options'' database flag set.'
else title || ' ''user options'' 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: