turbot/gcp_insights

Query: compute_backend_buckets_for_storage_bucket

Usage

powerpipe query gcp_insights.query.compute_backend_buckets_for_storage_bucket

SQL

with compute_backend_bucket as (
select
id,
bucket_name
from
gcp_compute_backend_bucket
), storage_bucket as (
select
id,
name
from
gcp_storage_bucket
where
id = split_part($1, '/', 1)
and project = split_part($1, '/', 2)
)
select
c.id::text as bucket_id
from
storage_bucket b,
compute_backend_bucket c
where
b.name = c.bucket_name;