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_typefrom gcp_vpc_access_connector;
select name, location, state, network, machine_typefrom 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, locationfrom gcp_vpc_access_connectorwhere ip_cidr_range = '10.8.0.0/28';
select name, ip_cidr_range, network, locationfrom gcp_vpc_access_connectorwhere 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_throughputfrom gcp_vpc_access_connectorwhere network = 'default' and max_throughput >= 1000;
select name, network, min_throughput, max_throughputfrom gcp_vpc_access_connectorwhere 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, locationfrom gcp_vpc_access_connectorwhere connected_projects is not null;
select name, json_extract(connected_projects, '$[0]') as project_name, network, locationfrom gcp_vpc_access_connectorwhere 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, locationfrom gcp_vpc_access_connectorwhere state = 'READY';
select name, state, project, locationfrom gcp_vpc_access_connectorwhere 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_rangefrom 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_rangefrom gcp_vpc_access_connector c, json_each(c.subnet) as s;
Schema for gcp_vpc_access_connector
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. | |
connected_projects | jsonb | List of projects using the connector. | |
ip_cidr_range | cidr | The range of internal addresses that follows RFC 4632 notation. | |
location | text | The GCP multi-region, region, or zone in which the resource is located. | |
machine_type | text | Machine type of VM Instance underlying connector. | |
max_instances | bigint | Maximum value of instances in autoscaling group underlying the connector. | |
max_throughput | bigint | Maximum throughput of the connector in Mbps. | |
min_instances | bigint | Minimum throughput of the connector in Mbps. | |
min_throughput | bigint | Minimum throughput of the connector in Mbps. | |
name | text | = | The resource name. |
network | text | Name of a VPC network. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
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. | |
state | text | State of the VPC access connector. | |
subnet | jsonb | The subnet in which to house the VPC Access Connector. | |
title | text | Title 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