Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi
Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const byId = hcloud.getStorageBox({
id: 1333,
});
const byName = hcloud.getStorageBox({
name: "backups",
});
const byLabelSelector = hcloud.getStorageBox({
withSelector: "env=production",
});
import pulumi
import pulumi_hcloud as hcloud
by_id = hcloud.get_storage_box(id=1333)
by_name = hcloud.get_storage_box(name="backups")
by_label_selector = hcloud.get_storage_box(with_selector="env=production")
package main
import (
"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hcloud.LookupStorageBox(ctx, &hcloud.LookupStorageBoxArgs{
Id: pulumi.IntRef(1333),
}, nil)
if err != nil {
return err
}
_, err = hcloud.LookupStorageBox(ctx, &hcloud.LookupStorageBoxArgs{
Name: pulumi.StringRef("backups"),
}, nil)
if err != nil {
return err
}
_, err = hcloud.LookupStorageBox(ctx, &hcloud.LookupStorageBoxArgs{
WithSelector: pulumi.StringRef("env=production"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() =>
{
var byId = HCloud.GetStorageBox.Invoke(new()
{
Id = 1333,
});
var byName = HCloud.GetStorageBox.Invoke(new()
{
Name = "backups",
});
var byLabelSelector = HCloud.GetStorageBox.Invoke(new()
{
WithSelector = "env=production",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetStorageBoxArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var byId = HcloudFunctions.getStorageBox(GetStorageBoxArgs.builder()
.id(1333)
.build());
final var byName = HcloudFunctions.getStorageBox(GetStorageBoxArgs.builder()
.name("backups")
.build());
final var byLabelSelector = HcloudFunctions.getStorageBox(GetStorageBoxArgs.builder()
.withSelector("env=production")
.build());
}
}
variables:
byId:
fn::invoke:
function: hcloud:getStorageBox
arguments:
id: 1333
byName:
fn::invoke:
function: hcloud:getStorageBox
arguments:
name: backups
byLabelSelector:
fn::invoke:
function: hcloud:getStorageBox
arguments:
withSelector: env=production
Using getStorageBox
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getStorageBox(args: GetStorageBoxArgs, opts?: InvokeOptions): Promise<GetStorageBoxResult>
function getStorageBoxOutput(args: GetStorageBoxOutputArgs, opts?: InvokeOptions): Output<GetStorageBoxResult>def get_storage_box(id: Optional[int] = None,
name: Optional[str] = None,
with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStorageBoxResult
def get_storage_box_output(id: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetStorageBoxResult]func LookupStorageBox(ctx *Context, args *LookupStorageBoxArgs, opts ...InvokeOption) (*LookupStorageBoxResult, error)
func LookupStorageBoxOutput(ctx *Context, args *LookupStorageBoxOutputArgs, opts ...InvokeOption) LookupStorageBoxResultOutput> Note: This function is named LookupStorageBox in the Go SDK.
public static class GetStorageBox
{
public static Task<GetStorageBoxResult> InvokeAsync(GetStorageBoxArgs args, InvokeOptions? opts = null)
public static Output<GetStorageBoxResult> Invoke(GetStorageBoxInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStorageBoxResult> getStorageBox(GetStorageBoxArgs args, InvokeOptions options)
public static Output<GetStorageBoxResult> getStorageBox(GetStorageBoxArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getStorageBox:getStorageBox
arguments:
# arguments dictionaryThe following arguments are supported:
- Id int
- ID of the Storage Box.
- Name string
- Name of the Storage Box.
- With
Selector string - Filter results using a Label Selector.
- Id int
- ID of the Storage Box.
- Name string
- Name of the Storage Box.
- With
Selector string - Filter results using a Label Selector.
- id Integer
- ID of the Storage Box.
- name String
- Name of the Storage Box.
- with
Selector String - Filter results using a Label Selector.
- id number
- ID of the Storage Box.
- name string
- Name of the Storage Box.
- with
Selector string - Filter results using a Label Selector.
- id int
- ID of the Storage Box.
- name str
- Name of the Storage Box.
- with_
selector str - Filter results using a Label Selector.
- id Number
- ID of the Storage Box.
- name String
- Name of the Storage Box.
- with
Selector String - Filter results using a Label Selector.
getStorageBox Result
The following output properties are available:
- Access
Settings Pulumi.HCloud. Outputs. Get Storage Box Access Settings - Access settings of the Storage Box.
- Delete
Protection bool - Whether delete protection is enabled.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Location string
- Name of the Location.
- Server string
- FQDN of the Storage Box.
- Snapshot
Plan Pulumi.HCloud. Outputs. Get Storage Box Snapshot Plan - Details of the active snapshot plan.
- Storage
Box stringType - Name of the Storage Box Type.
- System string
- Host system of the Storage Box.
- Username string
- Primary username of the Storage Box.
- Id int
- ID of the Storage Box.
- Name string
- Name of the Storage Box.
- With
Selector string - Filter results using a Label Selector.
- Access
Settings GetStorage Box Access Settings - Access settings of the Storage Box.
- Delete
Protection bool - Whether delete protection is enabled.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Location string
- Name of the Location.
- Server string
- FQDN of the Storage Box.
- Snapshot
Plan GetStorage Box Snapshot Plan - Details of the active snapshot plan.
- Storage
Box stringType - Name of the Storage Box Type.
- System string
- Host system of the Storage Box.
- Username string
- Primary username of the Storage Box.
- Id int
- ID of the Storage Box.
- Name string
- Name of the Storage Box.
- With
Selector string - Filter results using a Label Selector.
- access
Settings GetStorage Box Access Settings - Access settings of the Storage Box.
- delete
Protection Boolean - Whether delete protection is enabled.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- location String
- Name of the Location.
- server String
- FQDN of the Storage Box.
- snapshot
Plan GetStorage Box Snapshot Plan - Details of the active snapshot plan.
- storage
Box StringType - Name of the Storage Box Type.
- system String
- Host system of the Storage Box.
- username String
- Primary username of the Storage Box.
- id Integer
- ID of the Storage Box.
- name String
- Name of the Storage Box.
- with
Selector String - Filter results using a Label Selector.
- access
Settings GetStorage Box Access Settings - Access settings of the Storage Box.
- delete
Protection boolean - Whether delete protection is enabled.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- location string
- Name of the Location.
- server string
- FQDN of the Storage Box.
- snapshot
Plan GetStorage Box Snapshot Plan - Details of the active snapshot plan.
- storage
Box stringType - Name of the Storage Box Type.
- system string
- Host system of the Storage Box.
- username string
- Primary username of the Storage Box.
- id number
- ID of the Storage Box.
- name string
- Name of the Storage Box.
- with
Selector string - Filter results using a Label Selector.
- access_
settings GetStorage Box Access Settings - Access settings of the Storage Box.
- delete_
protection bool - Whether delete protection is enabled.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- location str
- Name of the Location.
- server str
- FQDN of the Storage Box.
- snapshot_
plan GetStorage Box Snapshot Plan - Details of the active snapshot plan.
- storage_
box_ strtype - Name of the Storage Box Type.
- system str
- Host system of the Storage Box.
- username str
- Primary username of the Storage Box.
- id int
- ID of the Storage Box.
- name str
- Name of the Storage Box.
- with_
selector str - Filter results using a Label Selector.
- access
Settings Property Map - Access settings of the Storage Box.
- delete
Protection Boolean - Whether delete protection is enabled.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- location String
- Name of the Location.
- server String
- FQDN of the Storage Box.
- snapshot
Plan Property Map - Details of the active snapshot plan.
- storage
Box StringType - Name of the Storage Box Type.
- system String
- Host system of the Storage Box.
- username String
- Primary username of the Storage Box.
- id Number
- ID of the Storage Box.
- name String
- Name of the Storage Box.
- with
Selector String - Filter results using a Label Selector.
Supporting Types
GetStorageBoxAccessSettings
- Reachable
Externally bool - Whether access from outside the Hetzner network is allowed.
- Samba
Enabled bool - Whether the Samba subsystem is enabled.
- Ssh
Enabled bool - Whether the SSH subsystem is enabled.
- Webdav
Enabled bool - Whether the WebDAV subsystem is enabled.
- Zfs
Enabled bool - Whether the ZFS snapshot folder is visible.
- Reachable
Externally bool - Whether access from outside the Hetzner network is allowed.
- Samba
Enabled bool - Whether the Samba subsystem is enabled.
- Ssh
Enabled bool - Whether the SSH subsystem is enabled.
- Webdav
Enabled bool - Whether the WebDAV subsystem is enabled.
- Zfs
Enabled bool - Whether the ZFS snapshot folder is visible.
- reachable
Externally Boolean - Whether access from outside the Hetzner network is allowed.
- samba
Enabled Boolean - Whether the Samba subsystem is enabled.
- ssh
Enabled Boolean - Whether the SSH subsystem is enabled.
- webdav
Enabled Boolean - Whether the WebDAV subsystem is enabled.
- zfs
Enabled Boolean - Whether the ZFS snapshot folder is visible.
- reachable
Externally boolean - Whether access from outside the Hetzner network is allowed.
- samba
Enabled boolean - Whether the Samba subsystem is enabled.
- ssh
Enabled boolean - Whether the SSH subsystem is enabled.
- webdav
Enabled boolean - Whether the WebDAV subsystem is enabled.
- zfs
Enabled boolean - Whether the ZFS snapshot folder is visible.
- reachable_
externally bool - Whether access from outside the Hetzner network is allowed.
- samba_
enabled bool - Whether the Samba subsystem is enabled.
- ssh_
enabled bool - Whether the SSH subsystem is enabled.
- webdav_
enabled bool - Whether the WebDAV subsystem is enabled.
- zfs_
enabled bool - Whether the ZFS snapshot folder is visible.
- reachable
Externally Boolean - Whether access from outside the Hetzner network is allowed.
- samba
Enabled Boolean - Whether the Samba subsystem is enabled.
- ssh
Enabled Boolean - Whether the SSH subsystem is enabled.
- webdav
Enabled Boolean - Whether the WebDAV subsystem is enabled.
- zfs
Enabled Boolean - Whether the ZFS snapshot folder is visible.
GetStorageBoxSnapshotPlan
- Day
Of intMonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- Day
Of intWeek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- Hour int
- Hour when the Snapshot Plan is executed (UTC).
- Max
Snapshots int - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- Minute int
- Minute when the Snapshot Plan is executed (UTC).
- Day
Of intMonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- Day
Of intWeek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- Hour int
- Hour when the Snapshot Plan is executed (UTC).
- Max
Snapshots int - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- Minute int
- Minute when the Snapshot Plan is executed (UTC).
- day
Of IntegerMonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- day
Of IntegerWeek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- hour Integer
- Hour when the Snapshot Plan is executed (UTC).
- max
Snapshots Integer - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- minute Integer
- Minute when the Snapshot Plan is executed (UTC).
- day
Of numberMonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- day
Of numberWeek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- hour number
- Hour when the Snapshot Plan is executed (UTC).
- max
Snapshots number - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- minute number
- Minute when the Snapshot Plan is executed (UTC).
- day_
of_ intmonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- day_
of_ intweek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- hour int
- Hour when the Snapshot Plan is executed (UTC).
- max_
snapshots int - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- minute int
- Minute when the Snapshot Plan is executed (UTC).
- day
Of NumberMonth - Day of the month when the Snapshot Plan is executed. Null means every day.
- day
Of NumberWeek - Day of the week when the Snapshot Plan is executed. Starts at 0 for Sunday til 6 for Saturday. Note that this differs from the API, which uses 1 (Monday) through 7 (Sunday). Null means every day.
- hour Number
- Hour when the Snapshot Plan is executed (UTC).
- max
Snapshots Number - Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
- minute Number
- Minute when the Snapshot Plan is executed (UTC).
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
Hetzner Cloud v1.29.0 published on Saturday, Nov 29, 2025 by Pulumi
