steampipe plugin install gcp

Table: gcp_compute_ha_vpn_gateway - Query GCP Compute HA VPN Gateways using SQL

Highly Available (HA) VPN Gateway is a resource within Google Cloud's GCP Compute service. It provides an entry point for connecting your Virtual Private Cloud (VPC) network to your on-premises network or another VPC network through an IPsec VPN tunnel. The HA VPN gateways are designed to provide high reliability, high throughput, and low latency.

Table Usage Guide

The gcp_compute_ha_vpn_gateway table provides insights into HA VPN Gateways within Google Cloud's GCP Compute service. As a network administrator, explore gateway-specific details through this table, including their ID, name, creation timestamp, and associated network details. Utilize it to uncover information about gateways, such as their status, interfaces, and the regions they are located in.

Examples

Basic info

Explore which High Availability (HA) VPN gateways are present in your Google Cloud Platform (GCP) setup. This can be beneficial in managing network connectivity and ensuring secure data transmission.

select
name,
id,
description,
location,
self_link,
kind
from
gcp_compute_ha_vpn_gateway;
select
name,
id,
description,
location,
self_link,
kind
from
gcp_compute_ha_vpn_gateway;

List VPN interfaces for all VPN gateways

Explore the VPN gateways within your Google Cloud Platform to identify each VPN interface's unique ID and IP address. This can be particularly useful for network management and troubleshooting connectivity issues.

select
name as vpn_gateway_name,
i ->> 'id' as vpn_interface_id,
i ->> 'ipAddress' as vpn_interface_ip_address
from
gcp_compute_ha_vpn_gateway g,
jsonb_array_elements(vpn_interfaces) i;
select
name as vpn_gateway_name,
json_extract(i.value, '$.id') as vpn_interface_id,
json_extract(i.value, '$.ipAddress') as vpn_interface_ip_address
from
gcp_compute_ha_vpn_gateway g,
json_each(vpn_interfaces) as i;

Get network detail per VPN gateway

Explore the specific details of each VPN gateway in your network, such as its creation timestamp, routing mode, location, and associated project. This can aid in understanding your network's configuration and how each VPN gateway contributes to the overall network structure.

select
n.name,
n.id,
n.creation_timestamp,
n.mtu,
n.routing_mode,
n.location,
n.project
from
gcp_compute_ha_vpn_gateway g,
gcp_compute_network n
where
g.network = n.self_link;
select
n.name,
n.id,
n.creation_timestamp,
n.mtu,
n.routing_mode,
n.location,
n.project
from
gcp_compute_ha_vpn_gateway g,
gcp_compute_network n
where
g.network = n.self_link;

Schema for gcp_compute_ha_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 vpn gateway.
idbigintThe unique identifier for the resource.
kindtextThe type of the resource.
label_fingerprinttextTo see the latest fingerprint, make a get() request to retrieve an VpnGateway.
labelsjsonbLabels for this resource.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
nametext=A friendly name that identifies the resource.
networktextURL 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 VPN gateway resides.
region_nametextName of the region where the VPN gateway resides. Only applicable for regional resources.
self_linktextThe server-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
vpn_connectionstextList of VPN connection for this VpnGateway.
vpn_interfacesjsonbThe list of VPN interfaces associated with this VPN gateway.

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_ha_vpn_gateway