steampipe plugin install hcloud

Table: hcloud_volume - Query Hetzner Cloud Volumes using SQL

A Volume in Hetzner Cloud is a block storage device that can be attached to a server in the same location. Volumes are independent resources that persist beyond the life of any server. They can be dynamically resized and moved between servers.

Table Usage Guide

The hcloud_volume table provides insights into Volumes within Hetzner Cloud. As a Cloud engineer, explore volume-specific details through this table, including size, location, and attached server. Utilize it to uncover information about volumes, such as those with larger sizes, the servers they are attached to, and their geographical locations.

Examples

List all volumes

Explore all the storage volumes in your infrastructure, ordered by their names, to gain insights into their creation timeline and manage resources effectively. This can be useful in assessing the utilization of storage resources and planning for future capacity needs.

select
id,
name,
created
from
hcloud_volume
order by
name;
select
id,
name,
created
from
hcloud_volume
order by
name;

List volumes with location data

Explore which volumes are associated with specific locations in your Hetzner Cloud environment. This can be useful in managing resources and understanding data distribution across different geographical areas.

select
v.name as volume_name,
l.name as location_name
from
hcloud_volume as v,
hcloud_location as l
where
v.location_id = l.id;
select
v.name as volume_name,
l.name as location_name
from
hcloud_volume as v,
hcloud_location as l
where
v.location_id = l.id;

Largest volumes

Discover the top five largest storage volumes in your cloud environment to better manage resource allocation and utilization. This can help in identifying potential areas for cost savings or performance improvements.

select
id,
name,
size
from
hcloud_volume
order by
size desc
limit
5;
select
id,
name,
size
from
hcloud_volume
order by
size desc
limit
5;

Schema for hcloud_volume

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
createdtimestamp with time zonePoint in time when the Volume was created.
formattextFilesystem of the Volume if formatted on creation, null if not formatted on creation.
idbigint=ID of the Volume.
labelsjsonbUser-defined labels (key-value pairs).
linux_devicetextDevice path on the file system for the Volume.
location_idbigintLocation of the Volume. Volume can only be attached to Servers in the same Location.
nametext=Name of the Volume. Must be unique per Project.
protectionjsonbProtection configuration for the Volume.
server_idbigintID of the Server the Volume is attached to, null if it is not attached at all.
sizebigintSize in GB of the Volume.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustext=Status of the volume: creating, available.

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_volume