turbot/gcp_insights

Query: pubsub_subscriptions_for_pubsub_topic

Usage

powerpipe query gcp_insights.query.pubsub_subscriptions_for_pubsub_topic

SQL

with pubsub_subscription as (
select
self_link,
topic_name
from
gcp_pubsub_subscription
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 subscription_self_link
from
pubsub_subscription s,
pubsub_topic t
where
s.topic_name = t.name;