Control: Compute Backend Bucket should not have dangling storage bucket
Description
This control ensures that Compute Backend Bucket does not have dangling storage bucket.
Usage
Run the control in your terminal:
powerpipe control run gcp_compliance.control.compute_backend_bucket_no_dangling_storage_bucket
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run gcp_compliance.control.compute_backend_bucket_no_dangling_storage_bucket --share
SQL
This control uses a named query:
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 projectfrom gcp_compute_backend_bucket as b left join gcp_storage_bucket as s on s.name = b.name and s.project = b.project;