turbot/gcp_insights

Query: compute_forwarding_rules_for_compute_network

Usage

powerpipe query gcp_insights.query.compute_forwarding_rules_for_compute_network

SQL

select
fr.id::text as rule_id
from
gcp_compute_forwarding_rule fr,
gcp_compute_network n
where
split_part(fr.network, 'networks/', 2) = n.name
and fr.project = n.project
and n.id = (split_part($1, '/', 1))::bigint
and n.project = split_part($1, '/', 2)
union
select
fr.id::text as rule_id
from
gcp_compute_global_forwarding_rule fr,
gcp_compute_network n
where
split_part(fr.network, 'networks/', 2) = n.name
and fr.project = n.project
and n.id = (split_part($1, '/', 1))::bigint
and n.project = split_part($1, '/', 2);