Control: Ensure 'user options' database flag for Cloud SQL SQL Server instance is not configured
Description
It is recommended that, user options database flag for Cloud SQL SQL Server instance should not be configured.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.sql_instance_sql_user_options_database_flag_not_configured
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.sql_instance_sql_user_options_database_flag_not_configured --share
SQL
This control uses a named query:
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 projectfrom gcp_sql_database_instance;