Table: gcp_compute_global_address - Query Google Cloud Compute Engine Global Addresses using SQL
Google Cloud Compute Engine Global Addresses are a resource in Google Cloud Platform that are used to reserve IP addresses for your project. These addresses can be used for various purposes such as HTTP(S), SSL proxy, and TCP proxy load balancing, or Cloud NAT. They can be either external or internal, with the allocation method either being automatic or manual.
Table Usage Guide
The gcp_compute_global_address
table provides insights into Global Addresses within Google Cloud Compute Engine. As a network engineer, explore address-specific details through this table, including the allocation method, network tier, and purpose of each address. Utilize it to manage and monitor the IP addresses reserved for your project, ensuring optimal utilization and network configuration.
Examples
List of internal address type global addresses
Discover the segments that consist of internal type global addresses in the Google Cloud Platform. This helps in understanding the distribution and usage of internal addresses within your cloud environment.
select name, id, address, address_typefrom gcp_compute_global_addresswhere address_type = 'INTERNAL';
select name, id, address, address_typefrom gcp_compute_global_addresswhere address_type = 'INTERNAL';
List of unused global addresses
Assess the elements within your Google Cloud Platform to identify unused global addresses. This can help optimize resource utilization and reduce costs by pinpointing areas of potential waste.
select name, address, statusfrom gcp_compute_global_addresswhere status <> 'IN_USE';
select name, address, statusfrom gcp_compute_global_addresswhere status <> 'IN_USE';
List of global addresses used for VPC peering
Explore which global addresses are used for the purpose of Virtual Private Cloud (VPC) peering. This is beneficial in understanding your network's connectivity and identifying potential areas for optimization or troubleshooting.
select name, address, purposefrom gcp_compute_global_addresswhere purpose = 'VPC_PEERING';
select name, address, purposefrom gcp_compute_global_addresswhere purpose = 'VPC_PEERING';
Query examples
Schema for gcp_compute_global_address
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
address | inet | The static IP address represented by this resource. | |
address_type | text | !=, = | The type of address to reserve, either INTERNAL or EXTERNAL. |
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 address. | |
id | bigint | The unique identifier for the resource. | |
ip_version | text | The IP version that will be used by this address. | |
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 in which to reserve the address. | |
network_tier | text | !=, = | Specifies the networking tier used for configuring this address. |
prefix_length | bigint | Specifies the prefix length if the resource represents an IP range. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
purpose | text | !=, = | Specifies the purpose of the resource. |
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 | !=, = | The status of the address. |
subnetwork | text | The URL of the subnetwork in which to reserve the address. | |
title | text | Title of the resource. | |
users | jsonb | A list of URLs of the resources that are using this address. |
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_global_address