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 terraform_gcp_compliance.control.sql_instance_sql_user_options_database_flag_not_configuredSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_gcp_compliance.control.sql_instance_sql_user_options_database_flag_not_configured --shareSQL
This control uses a named query:
select address as resource, case when coalesce(trim((attributes_std ->> 'database_version')), '') = '' then 'alarm' when (attributes_std ->> 'database_version') not like 'SQLSERVER%' then 'skip' when (attributes_std -> 'settings' -> 'database_flags' ->> 'name') = 'user options' then 'alarm' else 'ok' end as status, split_part(address, '.', 2) || case when coalesce(trim((attributes_std ->> 'database_version')), '') = '' then ' ''database_version'' is not defined' when (attributes_std ->> 'database_version') not like 'SQLSERVER%' then ' not a SQL Server database' when (attributes_std -> 'settings' -> 'database_flags' ->> 'name') = 'user options' then ' ''user options'' database flag set' else ' ''user options'' database flag not set' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'google_sql_database_instance';