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 config = new pulumi.Config();
const storageBoxId = config.requireObject<any>("storageBoxId");
const byId = hcloud.getStorageBoxSubaccount({
storageBoxId: storageBoxId,
id: 2,
});
const byUsername = hcloud.getStorageBoxSubaccount({
storageBoxId: storageBoxId,
username: "u507137-sub1",
});
const byLabelSelector = hcloud.getStorageBoxSubaccount({
storageBoxId: storageBoxId,
withSelector: "team=billing",
});
import pulumi
import pulumi_hcloud as hcloud
config = pulumi.Config()
storage_box_id = config.require_object("storageBoxId")
by_id = hcloud.get_storage_box_subaccount(storage_box_id=storage_box_id,
id=2)
by_username = hcloud.get_storage_box_subaccount(storage_box_id=storage_box_id,
username="u507137-sub1")
by_label_selector = hcloud.get_storage_box_subaccount(storage_box_id=storage_box_id,
with_selector="team=billing")
package main
import (
"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
storageBoxId := cfg.RequireObject("storageBoxId")
_, err := hcloud.LookupStorageBoxSubaccount(ctx, &hcloud.LookupStorageBoxSubaccountArgs{
StorageBoxId: storageBoxId,
Id: pulumi.IntRef(2),
}, nil)
if err != nil {
return err
}
_, err = hcloud.LookupStorageBoxSubaccount(ctx, &hcloud.LookupStorageBoxSubaccountArgs{
StorageBoxId: storageBoxId,
Username: pulumi.StringRef("u507137-sub1"),
}, nil)
if err != nil {
return err
}
_, err = hcloud.LookupStorageBoxSubaccount(ctx, &hcloud.LookupStorageBoxSubaccountArgs{
StorageBoxId: storageBoxId,
WithSelector: pulumi.StringRef("team=billing"),
}, 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 config = new Config();
var storageBoxId = config.RequireObject<dynamic>("storageBoxId");
var byId = HCloud.GetStorageBoxSubaccount.Invoke(new()
{
StorageBoxId = storageBoxId,
Id = 2,
});
var byUsername = HCloud.GetStorageBoxSubaccount.Invoke(new()
{
StorageBoxId = storageBoxId,
Username = "u507137-sub1",
});
var byLabelSelector = HCloud.GetStorageBoxSubaccount.Invoke(new()
{
StorageBoxId = storageBoxId,
WithSelector = "team=billing",
});
});
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.GetStorageBoxSubaccountArgs;
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 config = ctx.config();
final var storageBoxId = config.get("storageBoxId");
final var byId = HcloudFunctions.getStorageBoxSubaccount(GetStorageBoxSubaccountArgs.builder()
.storageBoxId(storageBoxId)
.id(2)
.build());
final var byUsername = HcloudFunctions.getStorageBoxSubaccount(GetStorageBoxSubaccountArgs.builder()
.storageBoxId(storageBoxId)
.username("u507137-sub1")
.build());
final var byLabelSelector = HcloudFunctions.getStorageBoxSubaccount(GetStorageBoxSubaccountArgs.builder()
.storageBoxId(storageBoxId)
.withSelector("team=billing")
.build());
}
}
configuration:
storageBoxId:
type: dynamic
variables:
byId:
fn::invoke:
function: hcloud:getStorageBoxSubaccount
arguments:
storageBoxId: ${storageBoxId}
id: 2
byUsername:
fn::invoke:
function: hcloud:getStorageBoxSubaccount
arguments:
storageBoxId: ${storageBoxId}
username: u507137-sub1
byLabelSelector:
fn::invoke:
function: hcloud:getStorageBoxSubaccount
arguments:
storageBoxId: ${storageBoxId}
withSelector: team=billing
Using getStorageBoxSubaccount
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 getStorageBoxSubaccount(args: GetStorageBoxSubaccountArgs, opts?: InvokeOptions): Promise<GetStorageBoxSubaccountResult>
function getStorageBoxSubaccountOutput(args: GetStorageBoxSubaccountOutputArgs, opts?: InvokeOptions): Output<GetStorageBoxSubaccountResult>def get_storage_box_subaccount(id: Optional[int] = None,
storage_box_id: Optional[int] = None,
username: Optional[str] = None,
with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetStorageBoxSubaccountResult
def get_storage_box_subaccount_output(id: Optional[pulumi.Input[int]] = None,
storage_box_id: Optional[pulumi.Input[int]] = None,
username: Optional[pulumi.Input[str]] = None,
with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetStorageBoxSubaccountResult]func LookupStorageBoxSubaccount(ctx *Context, args *LookupStorageBoxSubaccountArgs, opts ...InvokeOption) (*LookupStorageBoxSubaccountResult, error)
func LookupStorageBoxSubaccountOutput(ctx *Context, args *LookupStorageBoxSubaccountOutputArgs, opts ...InvokeOption) LookupStorageBoxSubaccountResultOutput> Note: This function is named LookupStorageBoxSubaccount in the Go SDK.
public static class GetStorageBoxSubaccount
{
public static Task<GetStorageBoxSubaccountResult> InvokeAsync(GetStorageBoxSubaccountArgs args, InvokeOptions? opts = null)
public static Output<GetStorageBoxSubaccountResult> Invoke(GetStorageBoxSubaccountInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStorageBoxSubaccountResult> getStorageBoxSubaccount(GetStorageBoxSubaccountArgs args, InvokeOptions options)
public static Output<GetStorageBoxSubaccountResult> getStorageBoxSubaccount(GetStorageBoxSubaccountArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getStorageBoxSubaccount:getStorageBoxSubaccount
arguments:
# arguments dictionaryThe following arguments are supported:
- Storage
Box intId - ID of the Storage Box.
- Id int
- ID of the Storage Box Subaccount.
- Username string
- Username of the Storage Box Subaccount.
- With
Selector string - Filter results using a Label Selector.
- Storage
Box intId - ID of the Storage Box.
- Id int
- ID of the Storage Box Subaccount.
- Username string
- Username of the Storage Box Subaccount.
- With
Selector string - Filter results using a Label Selector.
- storage
Box IntegerId - ID of the Storage Box.
- id Integer
- ID of the Storage Box Subaccount.
- username String
- Username of the Storage Box Subaccount.
- with
Selector String - Filter results using a Label Selector.
- storage
Box numberId - ID of the Storage Box.
- id number
- ID of the Storage Box Subaccount.
- username string
- Username of the Storage Box Subaccount.
- with
Selector string - Filter results using a Label Selector.
- storage_
box_ intid - ID of the Storage Box.
- id int
- ID of the Storage Box Subaccount.
- username str
- Username of the Storage Box Subaccount.
- with_
selector str - Filter results using a Label Selector.
- storage
Box NumberId - ID of the Storage Box.
- id Number
- ID of the Storage Box Subaccount.
- username String
- Username of the Storage Box Subaccount.
- with
Selector String - Filter results using a Label Selector.
getStorageBoxSubaccount Result
The following output properties are available:
- Access
Settings Pulumi.HCloud. Outputs. Get Storage Box Subaccount Access Settings - Access settings for the Subaccount.
- Description string
- Description of the Storage Box Subaccount.
- Home
Directory string - Home directory of the Storage Box Subaccount.
- Id int
- ID of the Storage Box Subaccount.
- Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Server string
- FQDN of the Storage Box Subaccount.
- Storage
Box intId - ID of the Storage Box.
- Username string
- Username of the Storage Box Subaccount.
- With
Selector string - Filter results using a Label Selector.
- Access
Settings GetStorage Box Subaccount Access Settings - Access settings for the Subaccount.
- Description string
- Description of the Storage Box Subaccount.
- Home
Directory string - Home directory of the Storage Box Subaccount.
- Id int
- ID of the Storage Box Subaccount.
- Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Server string
- FQDN of the Storage Box Subaccount.
- Storage
Box intId - ID of the Storage Box.
- Username string
- Username of the Storage Box Subaccount.
- With
Selector string - Filter results using a Label Selector.
- access
Settings GetStorage Box Subaccount Access Settings - Access settings for the Subaccount.
- description String
- Description of the Storage Box Subaccount.
- home
Directory String - Home directory of the Storage Box Subaccount.
- id Integer
- ID of the Storage Box Subaccount.
- labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- server String
- FQDN of the Storage Box Subaccount.
- storage
Box IntegerId - ID of the Storage Box.
- username String
- Username of the Storage Box Subaccount.
- with
Selector String - Filter results using a Label Selector.
- access
Settings GetStorage Box Subaccount Access Settings - Access settings for the Subaccount.
- description string
- Description of the Storage Box Subaccount.
- home
Directory string - Home directory of the Storage Box Subaccount.
- id number
- ID of the Storage Box Subaccount.
- labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- server string
- FQDN of the Storage Box Subaccount.
- storage
Box numberId - ID of the Storage Box.
- username string
- Username of the Storage Box Subaccount.
- with
Selector string - Filter results using a Label Selector.
- access_
settings GetStorage Box Subaccount Access Settings - Access settings for the Subaccount.
- description str
- Description of the Storage Box Subaccount.
- home_
directory str - Home directory of the Storage Box Subaccount.
- id int
- ID of the Storage Box Subaccount.
- labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- server str
- FQDN of the Storage Box Subaccount.
- storage_
box_ intid - ID of the Storage Box.
- username str
- Username of the Storage Box Subaccount.
- with_
selector str - Filter results using a Label Selector.
- access
Settings Property Map - Access settings for the Subaccount.
- description String
- Description of the Storage Box Subaccount.
- home
Directory String - Home directory of the Storage Box Subaccount.
- id Number
- ID of the Storage Box Subaccount.
- labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- server String
- FQDN of the Storage Box Subaccount.
- storage
Box NumberId - ID of the Storage Box.
- username String
- Username of the Storage Box Subaccount.
- with
Selector String - Filter results using a Label Selector.
Supporting Types
GetStorageBoxSubaccountAccessSettings
- Reachable
Externally bool - Whether access from outside the Hetzner network is allowed.
- Readonly bool
- Whether the Subaccount is read-only.
- 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.
- Reachable
Externally bool - Whether access from outside the Hetzner network is allowed.
- Readonly bool
- Whether the Subaccount is read-only.
- 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.
- reachable
Externally Boolean - Whether access from outside the Hetzner network is allowed.
- readonly Boolean
- Whether the Subaccount is read-only.
- 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.
- reachable
Externally boolean - Whether access from outside the Hetzner network is allowed.
- readonly boolean
- Whether the Subaccount is read-only.
- 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.
- reachable_
externally bool - Whether access from outside the Hetzner network is allowed.
- readonly bool
- Whether the Subaccount is read-only.
- 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.
- reachable
Externally Boolean - Whether access from outside the Hetzner network is allowed.
- readonly Boolean
- Whether the Subaccount is read-only.
- 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.
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
