turbot/gcp_compliance

Query: alloydb_instance_log_min_messages_database_flag_error

Usage

powerpipe query gcp_compliance.query.alloydb_instance_log_min_messages_database_flag_error

Steampipe Tables

SQL

select
self_link as resource,
case
when database_flags is null or not (database_flags ? 'log_min_messages') then 'alarm'
when database_flags @> '{"log_min_messages":"error"}' or database_flags @> '{"log_min_messages":"warning"}' then 'ok'
else 'alarm'
end as status,
case
when database_flags is null or not (database_flags ? 'log_min_messages') then title || ' log_min_messages database flag not set.'
when database_flags @> '{"log_min_messages":"error"}' then title || ' log_min_messages database flag set to ERROR.'
when database_flags @> '{"log_min_messages":"warning"}' then title || ' log_min_messages database flag set to WARNING.'
else title || ' log_min_messages database flag not set at minimum to WARNING.'
end as reason
, location as location, project as project
from
gcp_alloydb_instance;

Controls

The query is being used by the following controls: