turbot/gcp_compliance

Query: compute_backend_bucket_no_dangling_storage_bucket

Usage

powerpipe query gcp_compliance.query.compute_backend_bucket_no_dangling_storage_bucket

SQL

select
b.self_link resource,
case
when s.name is not null then 'ok'
else 'alarm'
end as status,
case
when s.name is not null then b.title || ' has no dangling storage bucket.'
else b.title || ' has dangling storage bucket.'
end as reason
, b.location as location, b.project as project
from
gcp_compute_backend_bucket as b
left join gcp_storage_bucket as s on s.name = b.name and s.project = b.project;

Controls

The query is being used by the following controls: