steampipe plugin install gcp

Table: gcp_compute_target_vpn_gateway - Query GCP Compute Engine Target VPN Gateways using SQL

A Target VPN Gateway in GCP Compute Engine is a virtual router that manages VPN tunnels, providing a way to securely connect networks. It handles traffic between your virtual network and your on-premises network, acting as a focal point for multiple VPN tunnels. This resource is critical for creating secure connections between GCP and your on-premises network.

Table Usage Guide

The gcp_compute_target_vpn_gateway table provides insights into Target VPN Gateways within Google Cloud Platform's Compute Engine. As a network administrator, you can explore gateway-specific details through this table, such as the associated network, the number of tunnels, and the creation timestamp. Use this table to maintain an overview of your VPN connections, monitor the status of each gateway, and ensure secure network communications.

Examples

Target VPN gateway basic info

Determine the basic information about your target VPN gateway in Google Cloud Platform. This can be useful for understanding the structure and configuration of your virtual private network.

select
name,
id,
self_link,
kind
from
gcp_compute_target_vpn_gateway;
select
name,
id,
self_link,
kind
from
gcp_compute_target_vpn_gateway;

List of all tunnels connected with the gateway

This example helps you identify all the tunnels that are connected to a specific VPN gateway. It is useful when managing network connections and ensuring secure data transmission between different network segments.

select
gateway.name as vpn_gateway_name,
tunnel.peer_ip,
tunnel.name as tunnel_name
from
gcp_compute_target_vpn_gateway as gateway,
jsonb_array_elements_text(tunnels) as t
join gcp_compute_vpn_tunnel as tunnel on t = tunnel.self_link;
select
gateway.name as vpn_gateway_name,
tunnel.peer_ip,
tunnel.name as tunnel_name
from
gcp_compute_target_vpn_gateway as gateway,
json_each(gateway.tunnels) as t
join gcp_compute_vpn_tunnel as tunnel on t.value = tunnel.self_link;

Schema for gcp_compute_target_vpn_gateway

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
creation_timestamptimestamp with time zoneThe creation timestamp of the resource.
descriptiontextA user-specified, human-readable description of the target vpn gateway.
forwarding_rulesjsonbA list of URLs to the ForwardingRule resources.
idbigintThe unique identifier for the resource.
kindtextThe type of the resource.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametext=A friendly name that identifies the resource.
networktextThe URL of the network to which this VPN gateway is attached.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
regiontextThe URL of the region where the target VPN gateway resides.
self_linktextThe server-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustext!=, =Specifies the status of the VPN gateway.
titletextTitle of the resource.
tunnelsjsonbA list of URLs to VpnTunnel resources.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp

You can pass the configuration to the command with the --config argument:

steampipe_export_gcp --config '<your_config>' gcp_compute_target_vpn_gateway