turbot/gcp_insights

Query: pubsub_snapshots_for_pubsub_topic

Usage

powerpipe query gcp_insights.query.pubsub_snapshots_for_pubsub_topic

SQL

with pubsub_snapshot as (
select
self_link,
topic_name
from
gcp_pubsub_snapshot
where
project = split_part($1, '/', 6)
), pubsub_topic as (
select
self_link,
name
from
gcp_pubsub_topic
where
project = split_part($1, '/', 6)
and self_link = $1
)
select
s.self_link as snapshot_self_link
from
pubsub_snapshot s,
pubsub_topic t
where
s.topic_name = t.name;