turbot/steampipe-mod-gcp-compliance

Control: SQL Instances should have labels configured

Description

It is recommended that SQL Instance is configured with proper labels.

Usage

Run the control in your terminal:

powerpipe control run gcp_compliance.control.sql_instance_with_labels

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_compliance.control.sql_instance_with_labels --share

SQL

This control uses a named query:

select
self_link resource,
case
when labels is not null then 'ok'
else 'alarm'
end as status,
case
when labels is not null then title || ' has labels attached.'
else title || ' no labels attached.'
end as reason
, location as location, project as project
from
gcp_sql_database_instance;

Tags