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, kindfrom gcp_compute_target_vpn_gateway;
select name, id, self_link, kindfrom 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_namefrom 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_namefrom 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
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
creation_timestamp | timestamp with time zone | The creation timestamp of the resource. | |
description | text | A user-specified, human-readable description of the target vpn gateway. | |
forwarding_rules | jsonb | A list of URLs to the ForwardingRule resources. | |
id | bigint | The unique identifier for the resource. | |
kind | text | The type of the resource. | |
location | text | The GCP multi-region, region, or zone in which the resource is located. | |
name | text | = | A friendly name that identifies the resource. |
network | text | The URL of the network to which this VPN gateway is attached. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
region | text | The URL of the region where the target VPN gateway resides. | |
self_link | text | The server-defined URL for the resource. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | !=, = | Specifies the status of the VPN gateway. |
title | text | Title of the resource. | |
tunnels | jsonb | A 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