Table: hcloud_location - Query Hetzner Cloud Locations using SQL
A Hetzner Cloud Location represents a data center where resources can be deployed. These locations are geographically distributed and are used to host the virtual machines (servers) and other resources provided by Hetzner Cloud. Each location has a unique name and provides different features and services.
Table Usage Guide
The hcloud_location
table provides insights into the data center locations within Hetzner Cloud. As a system administrator or a DevOps engineer, explore location-specific details through this table, including the name, description, and network zone of each location. Utilize it to uncover information about availability and features of each location, aiding in the strategic deployment of resources.
Examples
List all locations
Explore the various locations available in your Hetzner Cloud infrastructure, arranged in alphabetical order. This is particularly useful for understanding your geographical distribution and planning for data redundancy and latency optimization.
select *from hcloud_locationorder by name;
select *from hcloud_locationorder by name;
Get location by name
Discover the specifics of a particular location within the Hetzner Cloud service. This query can be used to gain insights into the settings and configuration of a chosen location, which is beneficial for planning and managing resources.
select *from hcloud_locationwhere name = 'hel1';
select *from hcloud_locationwhere name = 'hel1';
Schema for hcloud_location
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
city | text | City the Location is closest to. | |
country | text | ISO 3166-1 alpha-2 code of the country the Location resides in. | |
description | text | Description of the Location. | |
id | bigint | = | ID of the Location. |
latitude | double precision | Latitude of the city closest to the Location. | |
longitude | double precision | Longitude of the city closest to the Location. | |
name | text | = | Unique identifier of the Location. |
network_zone | text | Name of network zone this Location resides in. |
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)" -- hcloud
You can pass the configuration to the command with the --config
argument:
steampipe_export_hcloud --config '<your_config>' hcloud_location