Hetzner Cloud v1.28.0 published on Tuesday, Nov 11, 2025 by Pulumi
Hetzner Cloud v1.28.0 published on Tuesday, Nov 11, 2025 by Pulumi
Provides details about multiple Hetzner Cloud Networks.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const network2 = hcloud.getNetwork({});
const network3 = hcloud.getNetwork({
withSelector: "key=value",
});
import pulumi
import pulumi_hcloud as hcloud
network2 = hcloud.get_network()
network3 = hcloud.get_network(with_selector="key=value")
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.LookupNetwork(ctx, &hcloud.LookupNetworkArgs{}, nil)
if err != nil {
return err
}
_, err = hcloud.LookupNetwork(ctx, &hcloud.LookupNetworkArgs{
WithSelector: pulumi.StringRef("key=value"),
}, 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 network2 = HCloud.GetNetwork.Invoke();
var network3 = HCloud.GetNetwork.Invoke(new()
{
WithSelector = "key=value",
});
});
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.GetNetworkArgs;
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 network2 = HcloudFunctions.getNetwork(GetNetworkArgs.builder()
.build());
final var network3 = HcloudFunctions.getNetwork(GetNetworkArgs.builder()
.withSelector("key=value")
.build());
}
}
variables:
network2:
fn::invoke:
function: hcloud:getNetwork
arguments: {}
network3:
fn::invoke:
function: hcloud:getNetwork
arguments:
withSelector: key=value
Using getNetworks
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 getNetworks(args: GetNetworksArgs, opts?: InvokeOptions): Promise<GetNetworksResult>
function getNetworksOutput(args: GetNetworksOutputArgs, opts?: InvokeOptions): Output<GetNetworksResult>def get_networks(with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworksResult
def get_networks_output(with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworksResult]func GetNetworks(ctx *Context, args *GetNetworksArgs, opts ...InvokeOption) (*GetNetworksResult, error)
func GetNetworksOutput(ctx *Context, args *GetNetworksOutputArgs, opts ...InvokeOption) GetNetworksResultOutput> Note: This function is named GetNetworks in the Go SDK.
public static class GetNetworks
{
public static Task<GetNetworksResult> InvokeAsync(GetNetworksArgs args, InvokeOptions? opts = null)
public static Output<GetNetworksResult> Invoke(GetNetworksInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
public static Output<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getNetworks:getNetworks
arguments:
# arguments dictionaryThe following arguments are supported:
- With
Selector string - Label selector
- With
Selector string - Label selector
- with
Selector String - Label selector
- with
Selector string - Label selector
- with
Selector String - Label selector
getNetworks Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
List<Pulumi.
HCloud. Outputs. Get Networks Network> - (list) List of all matching networks. See
data.hcloud_networkfor schema. - With
Selector string
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
[]Get
Networks Network - (list) List of all matching networks. See
data.hcloud_networkfor schema. - With
Selector string
- id String
- The provider-assigned unique ID for this managed resource.
- networks
List<Get
Networks Network> - (list) List of all matching networks. See
data.hcloud_networkfor schema. - with
Selector String
- id string
- The provider-assigned unique ID for this managed resource.
- networks
Get
Networks Network[] - (list) List of all matching networks. See
data.hcloud_networkfor schema. - with
Selector string
- id str
- The provider-assigned unique ID for this managed resource.
- networks
Sequence[Get
Networks Network] - (list) List of all matching networks. See
data.hcloud_networkfor schema. - with_
selector str
- id String
- The provider-assigned unique ID for this managed resource.
- networks List<Property Map>
- (list) List of all matching networks. See
data.hcloud_networkfor schema. - with
Selector String
Supporting Types
GetNetworksNetwork
- Delete
Protection bool - Expose
Routes boolTo Vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- Id int
- Ip
Range string - Labels Dictionary<string, string>
- Name string
- Delete
Protection bool - Expose
Routes boolTo Vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- Id int
- Ip
Range string - Labels map[string]string
- Name string
- delete
Protection Boolean - expose
Routes BooleanTo Vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- id Integer
- ip
Range String - labels Map<String,String>
- name String
- delete
Protection boolean - expose
Routes booleanTo Vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- id number
- ip
Range string - labels {[key: string]: string}
- name string
- delete_
protection bool - expose_
routes_ boolto_ vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- id int
- ip_
range str - labels Mapping[str, str]
- name str
- delete
Protection Boolean - expose
Routes BooleanTo Vswitch - Indicates if the routes from this network should be exposed to the vSwitch connection. The exposing only takes effect if a vSwitch connection is active.
- id Number
- ip
Range String - labels Map<String>
- name String
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.28.0 published on Tuesday, Nov 11, 2025 by Pulumi
