turbot/gcp_labels

Control: Compute images should be labeled

Description

Check if Compute images have at least 1 label.

Usage

Run the control in your terminal:

powerpipe control run gcp_labels.control.compute_image_unlabeled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run gcp_labels.control.compute_image_unlabeled --share

Steampipe Tables

SQL

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