steampipe plugin install gcp

Table: gcp_vpc_access_connector - Query GCP VPC Access Connectors using SQL

Google Cloud VPC Access Connector provides a way to enable serverless applications to connect securely to your Virtual Private Cloud (VPC) network. The gcp_vpc_access_connector table in Steampipe allows you to query information about VPC Access Connectors in your GCP environment, including their IP ranges, network settings, and associated projects.

Table Usage Guide

The gcp_vpc_access_connector table is useful for cloud administrators and network engineers who need to gather detailed insights into their VPC Access Connectors. You can query various aspects of the connectors, such as their machine types, throughput configurations, state, and associated projects. This table is particularly useful for managing and monitoring network configurations, ensuring secure connectivity, and optimizing resource usage.

Examples

Basic info

Retrieve basic information about VPC Access Connectors, including their name, location, and state.

select
name,
location,
state,
network,
machine_type
from
gcp_vpc_access_connector;
select
name,
location,
state,
network,
machine_type
from
gcp_vpc_access_connector;

List connectors with specific IP CIDR ranges

Identify connectors that are using specific IP CIDR ranges, which can help in managing IP address allocation and avoiding conflicts.

select
name,
ip_cidr_range,
network,
location
from
gcp_vpc_access_connector
where
ip_cidr_range = '10.8.0.0/28';
select
name,
ip_cidr_range,
network,
location
from
gcp_vpc_access_connector
where
ip_cidr_range = '10.8.0.0/28';

List connectors by network and throughput

Retrieve connectors that are part of a specific VPC network and have a specific throughput configuration, which can be useful for optimizing network performance.

select
name,
network,
min_throughput,
max_throughput
from
gcp_vpc_access_connector
where
network = 'default'
and max_throughput >= 1000;
select
name,
network,
min_throughput,
max_throughput
from
gcp_vpc_access_connector
where
network = 'default'
and max_throughput >= 1000;

List the projects associated with the connectors

Identify VPC Access Connectors that are being used by specific projects, which can help in understanding project dependencies and managing access.

select
name,
jsonb_array_elements_text(connected_projects) as project_name,
network,
location
from
gcp_vpc_access_connector
where
connected_projects is not null;
select
name,
json_extract(connected_projects, '$[0]') as project_name,
network,
location
from
gcp_vpc_access_connector
where
connected_projects is not null;

List connectors by state

Retrieve a list of connectors filtered by their state and project, which can help in monitoring the status of connectors in specific environments.

select
name,
state,
project,
location
from
gcp_vpc_access_connector
where
state = 'READY';
select
name,
state,
project,
location
from
gcp_vpc_access_connector
where
state = 'READY';

Connectors with their associated subnets

Retrieve information about VPC Access Connectors and their associated subnets.

select
c.name as connector_name,
c.location,
c.network,
s ->> 'name' as subnet_name,
s ->> 'ipCidrRange' as subnet_ip_range
from
gcp_vpc_access_connector c,
jsonb_array_elements(c.subnet) as s;
select
c.name as connector_name,
c.location,
c.network,
json_extract(s.value, '$.name') as subnet_name,
json_extract(s.value, '$.ipCidrRange') as subnet_ip_range
from
gcp_vpc_access_connector c,
json_each(c.subnet) as s;

Schema for gcp_vpc_access_connector

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
connected_projectsjsonbList of projects using the connector.
ip_cidr_rangecidrThe range of internal addresses that follows RFC 4632 notation.
locationtextThe GCP multi-region, region, or zone in which the resource is located.
machine_typetextMachine type of VM Instance underlying connector.
max_instancesbigintMaximum value of instances in autoscaling group underlying the connector.
max_throughputbigintMaximum throughput of the connector in Mbps.
min_instancesbigintMinimum throughput of the connector in Mbps.
min_throughputbigintMinimum throughput of the connector in Mbps.
nametext=The resource name.
networktextName of a VPC network.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
self_linktextThe server-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statetextState of the VPC access connector.
subnetjsonbThe subnet in which to house the VPC Access Connector.
titletextTitle of the resource.

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_vpc_access_connector