turbot/gcp_insights

Query: compute_vpn_gateways_for_compute_network

Usage

powerpipe query gcp_insights.query.compute_vpn_gateways_for_compute_network

SQL

with compute_ha_vpn_gateway as (
select
id,
network
from
gcp_compute_ha_vpn_gateway
), compute_network as (
select
self_link,
id
from
gcp_compute_network
where
id = (split_part($1, '/', 1))::bigint
and project = split_part($1, '/', 2)
)
select
g.id::text as gateway_id
from
compute_ha_vpn_gateway g,
compute_network n
where
g.network = n.self_link;