turbot/gcp_insights

Query: compute_forwarding_rules_for_compute_subnetwork

Usage

powerpipe query gcp_insights.query.compute_forwarding_rules_for_compute_subnetwork

SQL

select
r.id :: text as rule_id
from
gcp_compute_forwarding_rule r,
gcp_compute_subnetwork s
where
s.id = $1
and split_part(r.subnetwork, 'subnetworks/', 2) = s.name
union
select
r.id :: text as rule_id
from
gcp_compute_global_forwarding_rule r,
gcp_compute_subnetwork s
where
s.id = $1
and split_part(r.subnetwork, 'subnetworks/', 2) = s.name;