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 Load Balancers.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const lb2 = hcloud.getLoadBalancers({});
const lb3 = hcloud.getLoadBalancers({
withSelector: "key=value",
});
import pulumi
import pulumi_hcloud as hcloud
lb2 = hcloud.get_load_balancers()
lb3 = hcloud.get_load_balancers(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.GetLoadBalancers(ctx, &hcloud.GetLoadBalancersArgs{}, nil)
if err != nil {
return err
}
_, err = hcloud.GetLoadBalancers(ctx, &hcloud.GetLoadBalancersArgs{
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 lb2 = HCloud.GetLoadBalancers.Invoke();
var lb3 = HCloud.GetLoadBalancers.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.GetLoadBalancersArgs;
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 lb2 = HcloudFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
.build());
final var lb3 = HcloudFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
.withSelector("key=value")
.build());
}
}
variables:
lb2:
fn::invoke:
function: hcloud:getLoadBalancers
arguments: {}
lb3:
fn::invoke:
function: hcloud:getLoadBalancers
arguments:
withSelector: key=value
Using getLoadBalancers
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 getLoadBalancers(args: GetLoadBalancersArgs, opts?: InvokeOptions): Promise<GetLoadBalancersResult>
function getLoadBalancersOutput(args: GetLoadBalancersOutputArgs, opts?: InvokeOptions): Output<GetLoadBalancersResult>def get_load_balancers(with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLoadBalancersResult
def get_load_balancers_output(with_selector: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLoadBalancersResult]func GetLoadBalancers(ctx *Context, args *GetLoadBalancersArgs, opts ...InvokeOption) (*GetLoadBalancersResult, error)
func GetLoadBalancersOutput(ctx *Context, args *GetLoadBalancersOutputArgs, opts ...InvokeOption) GetLoadBalancersResultOutput> Note: This function is named GetLoadBalancers in the Go SDK.
public static class GetLoadBalancers
{
public static Task<GetLoadBalancersResult> InvokeAsync(GetLoadBalancersArgs args, InvokeOptions? opts = null)
public static Output<GetLoadBalancersResult> Invoke(GetLoadBalancersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
public static Output<GetLoadBalancersResult> getLoadBalancers(GetLoadBalancersArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getLoadBalancers:getLoadBalancers
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
getLoadBalancers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancers List<Pulumi.HCloud. Outputs. Get Load Balancers Load Balancer> - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - With
Selector string
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancers []GetLoad Balancers Load Balancer - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - With
Selector string
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancers List<GetLoad Balancers Load Balancer> - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - with
Selector String
- id string
- The provider-assigned unique ID for this managed resource.
- load
Balancers GetLoad Balancers Load Balancer[] - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - with
Selector string
- id str
- The provider-assigned unique ID for this managed resource.
- load_
balancers Sequence[GetLoad Balancers Load Balancer] - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - with_
selector str
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancers List<Property Map> - (list) List of all matching load balancers. See
data.hcloud_load_balancerfor schema. - with
Selector String
Supporting Types
GetLoadBalancersLoadBalancer
- Algorithms
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Algorithm> - Delete
Protection bool - Id int
- Ipv4 string
- Ipv6 string
- Labels Dictionary<string, string>
- Load
Balancer stringType - Location string
- Network
Id int - Network
Ip string - Network
Zone string - Services
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Service> - Targets
List<Pulumi.
HCloud. Inputs. Get Load Balancers Load Balancer Target> - Name string
- Algorithms
[]Get
Load Balancers Load Balancer Algorithm - Delete
Protection bool - Id int
- Ipv4 string
- Ipv6 string
- Labels map[string]string
- Load
Balancer stringType - Location string
- Network
Id int - Network
Ip string - Network
Zone string - Services
[]Get
Load Balancers Load Balancer Service - Targets
[]Get
Load Balancers Load Balancer Target - Name string
- algorithms
List<Get
Load Balancers Load Balancer Algorithm> - delete
Protection Boolean - id Integer
- ipv4 String
- ipv6 String
- labels Map<String,String>
- load
Balancer StringType - location String
- network
Id Integer - network
Ip String - network
Zone String - services
List<Get
Load Balancers Load Balancer Service> - targets
List<Get
Load Balancers Load Balancer Target> - name String
- algorithms
Get
Load Balancers Load Balancer Algorithm[] - delete
Protection boolean - id number
- ipv4 string
- ipv6 string
- labels {[key: string]: string}
- load
Balancer stringType - location string
- network
Id number - network
Ip string - network
Zone string - services
Get
Load Balancers Load Balancer Service[] - targets
Get
Load Balancers Load Balancer Target[] - name string
- algorithms
Sequence[Get
Load Balancers Load Balancer Algorithm] - delete_
protection bool - id int
- ipv4 str
- ipv6 str
- labels Mapping[str, str]
- load_
balancer_ strtype - location str
- network_
id int - network_
ip str - network_
zone str - services
Sequence[Get
Load Balancers Load Balancer Service] - targets
Sequence[Get
Load Balancers Load Balancer Target] - name str
- algorithms List<Property Map>
- delete
Protection Boolean - id Number
- ipv4 String
- ipv6 String
- labels Map<String>
- load
Balancer StringType - location String
- network
Id Number - network
Ip String - network
Zone String - services List<Property Map>
- targets List<Property Map>
- name String
GetLoadBalancersLoadBalancerAlgorithm
- Type string
- Type string
- type String
- type string
- type str
- type String
GetLoadBalancersLoadBalancerService
- destination
Port Number - health
Checks List<Property Map> - https List<Property Map>
- listen
Port Number - protocol String
- proxyprotocol Boolean
GetLoadBalancersLoadBalancerServiceHealthCheck
GetLoadBalancersLoadBalancerServiceHealthCheckHttp
- Domain string
- Path string
- Response string
- Status
Codes List<int> - Tls bool
- Domain string
- Path string
- Response string
- Status
Codes []int - Tls bool
- domain String
- path String
- response String
- status
Codes List<Integer> - tls Boolean
- domain string
- path string
- response string
- status
Codes number[] - tls boolean
- domain str
- path str
- response str
- status_
codes Sequence[int] - tls bool
- domain String
- path String
- response String
- status
Codes List<Number> - tls Boolean
GetLoadBalancersLoadBalancerServiceHttp
- Certificates List<string>
- int
- string
- Redirect
Http bool - Sticky
Sessions bool
- Certificates []string
- int
- string
- Redirect
Http bool - Sticky
Sessions bool
- certificates List<String>
- Integer
- String
- redirect
Http Boolean - sticky
Sessions Boolean
- certificates string[]
- number
- string
- redirect
Http boolean - sticky
Sessions boolean
- certificates Sequence[str]
- int
- str
- redirect_
http bool - sticky_
sessions bool
- certificates List<String>
- Number
- String
- redirect
Http Boolean - sticky
Sessions Boolean
GetLoadBalancersLoadBalancerTarget
- Label
Selector string - Server
Id int - Type string
- Label
Selector string - Server
Id int - Type string
- label
Selector String - server
Id Integer - type String
- label
Selector string - server
Id number - type string
- label_
selector str - server_
id int - type str
- label
Selector String - server
Id Number - type 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
