Table: gcp_compute_zone - Query Google Cloud Compute Engine Zones using SQL
Google Cloud Compute Engine Zones are geographical locations where Google Cloud resources are deployed and managed. Each zone is a deployment area within a region and is designed to be isolated from failures in other zones. Zones are ideal for deploying high availability applications and for distributing resources to provide disaster recovery.
Table Usage Guide
The gcp_compute_zone
table provides insights into the zones within Google Cloud Compute Engine. As a Cloud Engineer, you can explore zone-specific details through this table, including the zone's status, region, and available CPU platforms. Utilize it to manage resource allocation and distribution, and to plan for disaster recovery and high availability applications.
Examples
Compute zone basic info
Explore which zones within your Google Cloud Platform's compute engine are active and where they are located. This is useful for understanding the distribution and status of your compute resources.
select name, id, region_name, statusfrom gcp_compute_zone;
select name, id, region_name, statusfrom gcp_compute_zone;
Get the available cpu platforms in each zone
Determine the areas in which different CPU platforms are available in each zone to optimize resource allocation and performance.
select name, available_cpu_platformsfrom gcp_compute_zone;
select name, available_cpu_platformsfrom gcp_compute_zone;
Get the zones which are down
Explore which zones in your GCP Compute environment are currently down. This is useful for quickly identifying areas of your infrastructure that may be experiencing issues.
select name, id, region_name, statusfrom gcp_compute_zonewhere status = 'DOWN';
select name, id, region_name, statusfrom gcp_compute_zonewhere status = 'DOWN';
Schema for gcp_compute_zone
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. | |
available_cpu_platforms | jsonb | Available cpu/platform selections for the zone. | |
description | text | Textual description of the resource. | |
id | text | The unique identifier for the zone. | |
kind | text | Type of the resource. Always compute#zone for zones. | |
location | text | The GCP multi-region, region, or zone in which the resource is located. | |
name | text | !=, = | The name of the zone. |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
region | text | Full URL reference to the region which hosts the zone. | |
region_name | text | Region name which hosts the zone. | |
self_link | text | Server-defined URL for the zone. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | !=, = | Status of the zone, either UP or DOWN. |
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_compute_zone