1. Packages
  2. Hcloud Provider
  3. API Docs
  4. LoadBalancer
Hetzner Cloud v1.22.0 published on Wednesday, Feb 26, 2025 by Pulumi

hcloud.LoadBalancer

Explore with Pulumi AI

Provides a Hetzner Cloud Load Balancer to represent a Load Balancer in the Hetzner Cloud.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const myServer = new hcloud.Server("my_server", {
    name: "server-%d",
    serverType: "cx22",
    image: "ubuntu-18.04",
});
const loadBalancer = new hcloud.LoadBalancer("load_balancer", {
    name: "my-load-balancer",
    loadBalancerType: "lb11",
    location: "nbg1",
});
const loadBalancerTarget = new hcloud.LoadBalancerTarget("load_balancer_target", {
    type: "server",
    loadBalancerId: loadBalancer.id,
    serverId: myServer.id,
});
Copy
import pulumi
import pulumi_hcloud as hcloud

my_server = hcloud.Server("my_server",
    name="server-%d",
    server_type="cx22",
    image="ubuntu-18.04")
load_balancer = hcloud.LoadBalancer("load_balancer",
    name="my-load-balancer",
    load_balancer_type="lb11",
    location="nbg1")
load_balancer_target = hcloud.LoadBalancerTarget("load_balancer_target",
    type="server",
    load_balancer_id=load_balancer.id,
    server_id=my_server.id)
Copy
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 {
		myServer, err := hcloud.NewServer(ctx, "my_server", &hcloud.ServerArgs{
			Name:       pulumi.String("server-%d"),
			ServerType: pulumi.String("cx22"),
			Image:      pulumi.String("ubuntu-18.04"),
		})
		if err != nil {
			return err
		}
		loadBalancer, err := hcloud.NewLoadBalancer(ctx, "load_balancer", &hcloud.LoadBalancerArgs{
			Name:             pulumi.String("my-load-balancer"),
			LoadBalancerType: pulumi.String("lb11"),
			Location:         pulumi.String("nbg1"),
		})
		if err != nil {
			return err
		}
		_, err = hcloud.NewLoadBalancerTarget(ctx, "load_balancer_target", &hcloud.LoadBalancerTargetArgs{
			Type:           pulumi.String("server"),
			LoadBalancerId: loadBalancer.ID(),
			ServerId:       myServer.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;

return await Deployment.RunAsync(() => 
{
    var myServer = new HCloud.Server("my_server", new()
    {
        Name = "server-%d",
        ServerType = "cx22",
        Image = "ubuntu-18.04",
    });

    var loadBalancer = new HCloud.LoadBalancer("load_balancer", new()
    {
        Name = "my-load-balancer",
        LoadBalancerType = "lb11",
        Location = "nbg1",
    });

    var loadBalancerTarget = new HCloud.LoadBalancerTarget("load_balancer_target", new()
    {
        Type = "server",
        LoadBalancerId = loadBalancer.Id,
        ServerId = myServer.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.Server;
import com.pulumi.hcloud.ServerArgs;
import com.pulumi.hcloud.LoadBalancer;
import com.pulumi.hcloud.LoadBalancerArgs;
import com.pulumi.hcloud.LoadBalancerTarget;
import com.pulumi.hcloud.LoadBalancerTargetArgs;
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) {
        var myServer = new Server("myServer", ServerArgs.builder()
            .name("server-%d")
            .serverType("cx22")
            .image("ubuntu-18.04")
            .build());

        var loadBalancer = new LoadBalancer("loadBalancer", LoadBalancerArgs.builder()
            .name("my-load-balancer")
            .loadBalancerType("lb11")
            .location("nbg1")
            .build());

        var loadBalancerTarget = new LoadBalancerTarget("loadBalancerTarget", LoadBalancerTargetArgs.builder()
            .type("server")
            .loadBalancerId(loadBalancer.id())
            .serverId(myServer.id())
            .build());

    }
}
Copy
resources:
  myServer:
    type: hcloud:Server
    name: my_server
    properties:
      name: server-%d
      serverType: cx22
      image: ubuntu-18.04
  loadBalancer:
    type: hcloud:LoadBalancer
    name: load_balancer
    properties:
      name: my-load-balancer
      loadBalancerType: lb11
      location: nbg1
  loadBalancerTarget:
    type: hcloud:LoadBalancerTarget
    name: load_balancer_target
    properties:
      type: server
      loadBalancerId: ${loadBalancer.id}
      serverId: ${myServer.id}
Copy

Create LoadBalancer Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancer(resource_name: str,
                 args: LoadBalancerArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def LoadBalancer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 load_balancer_type: Optional[str] = None,
                 algorithm: Optional[LoadBalancerAlgorithmArgs] = None,
                 delete_protection: Optional[bool] = None,
                 labels: Optional[Mapping[str, str]] = None,
                 location: Optional[str] = None,
                 name: Optional[str] = None,
                 network_zone: Optional[str] = None,
                 targets: Optional[Sequence[LoadBalancerTargetArgs]] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
public LoadBalancer(String name, LoadBalancerArgs args)
public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
type: hcloud:LoadBalancer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var loadBalancerResource = new HCloud.LoadBalancer("loadBalancerResource", new()
{
    LoadBalancerType = "string",
    Algorithm = new HCloud.Inputs.LoadBalancerAlgorithmArgs
    {
        Type = "string",
    },
    DeleteProtection = false,
    Labels = 
    {
        { "string", "string" },
    },
    Location = "string",
    Name = "string",
    NetworkZone = "string",
});
Copy
example, err := hcloud.NewLoadBalancer(ctx, "loadBalancerResource", &hcloud.LoadBalancerArgs{
	LoadBalancerType: pulumi.String("string"),
	Algorithm: &hcloud.LoadBalancerAlgorithmArgs{
		Type: pulumi.String("string"),
	},
	DeleteProtection: pulumi.Bool(false),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Location:    pulumi.String("string"),
	Name:        pulumi.String("string"),
	NetworkZone: pulumi.String("string"),
})
Copy
var loadBalancerResource = new LoadBalancer("loadBalancerResource", LoadBalancerArgs.builder()
    .loadBalancerType("string")
    .algorithm(LoadBalancerAlgorithmArgs.builder()
        .type("string")
        .build())
    .deleteProtection(false)
    .labels(Map.of("string", "string"))
    .location("string")
    .name("string")
    .networkZone("string")
    .build());
Copy
load_balancer_resource = hcloud.LoadBalancer("loadBalancerResource",
    load_balancer_type="string",
    algorithm={
        "type": "string",
    },
    delete_protection=False,
    labels={
        "string": "string",
    },
    location="string",
    name="string",
    network_zone="string")
Copy
const loadBalancerResource = new hcloud.LoadBalancer("loadBalancerResource", {
    loadBalancerType: "string",
    algorithm: {
        type: "string",
    },
    deleteProtection: false,
    labels: {
        string: "string",
    },
    location: "string",
    name: "string",
    networkZone: "string",
});
Copy
type: hcloud:LoadBalancer
properties:
    algorithm:
        type: string
    deleteProtection: false
    labels:
        string: string
    loadBalancerType: string
    location: string
    name: string
    networkZone: string
Copy

LoadBalancer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LoadBalancer resource accepts the following input properties:

LoadBalancerType This property is required. string
Type of the Load Balancer.
Algorithm Pulumi.HCloud.Inputs.LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
DeleteProtection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
Labels Dictionary<string, string>
User-defined labels (key-value pairs) should be created with.
Location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
Name string
Name of the Load Balancer.
NetworkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
Targets List<Pulumi.HCloud.Inputs.LoadBalancerTarget>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

LoadBalancerType This property is required. string
Type of the Load Balancer.
Algorithm LoadBalancerAlgorithmArgs
Configuration of the algorithm the Load Balancer use.
DeleteProtection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
Labels map[string]string
User-defined labels (key-value pairs) should be created with.
Location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
Name string
Name of the Load Balancer.
NetworkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
Targets []LoadBalancerTargetTypeArgs

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

loadBalancerType This property is required. String
Type of the Load Balancer.
algorithm LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
deleteProtection Boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
labels Map<String,String>
User-defined labels (key-value pairs) should be created with.
location Changes to this property will trigger replacement. String
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name String
Name of the Load Balancer.
networkZone Changes to this property will trigger replacement. String
The Network Zone of the Load Balancer. Require when no location is set.
targets List<LoadBalancerTarget>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

loadBalancerType This property is required. string
Type of the Load Balancer.
algorithm LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
deleteProtection boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
labels {[key: string]: string}
User-defined labels (key-value pairs) should be created with.
location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name string
Name of the Load Balancer.
networkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
targets LoadBalancerTarget[]

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

load_balancer_type This property is required. str
Type of the Load Balancer.
algorithm LoadBalancerAlgorithmArgs
Configuration of the algorithm the Load Balancer use.
delete_protection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
labels Mapping[str, str]
User-defined labels (key-value pairs) should be created with.
location Changes to this property will trigger replacement. str
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name str
Name of the Load Balancer.
network_zone Changes to this property will trigger replacement. str
The Network Zone of the Load Balancer. Require when no location is set.
targets Sequence[LoadBalancerTargetArgs]

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

loadBalancerType This property is required. String
Type of the Load Balancer.
algorithm Property Map
Configuration of the algorithm the Load Balancer use.
deleteProtection Boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
labels Map<String>
User-defined labels (key-value pairs) should be created with.
location Changes to this property will trigger replacement. String
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name String
Name of the Load Balancer.
networkZone Changes to this property will trigger replacement. String
The Network Zone of the Load Balancer. Require when no location is set.
targets List<Property Map>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Ipv4 string
(string) IPv4 Address of the Load Balancer.
Ipv6 string
(string) IPv6 Address of the Load Balancer.
NetworkId int
(int) ID of the first private network that this Load Balancer is connected to.
NetworkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
Id string
The provider-assigned unique ID for this managed resource.
Ipv4 string
(string) IPv4 Address of the Load Balancer.
Ipv6 string
(string) IPv6 Address of the Load Balancer.
NetworkId int
(int) ID of the first private network that this Load Balancer is connected to.
NetworkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
id String
The provider-assigned unique ID for this managed resource.
ipv4 String
(string) IPv4 Address of the Load Balancer.
ipv6 String
(string) IPv6 Address of the Load Balancer.
networkId Integer
(int) ID of the first private network that this Load Balancer is connected to.
networkIp String
(string) IP of the Load Balancer in the first private network that it is connected to.
id string
The provider-assigned unique ID for this managed resource.
ipv4 string
(string) IPv4 Address of the Load Balancer.
ipv6 string
(string) IPv6 Address of the Load Balancer.
networkId number
(int) ID of the first private network that this Load Balancer is connected to.
networkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
id str
The provider-assigned unique ID for this managed resource.
ipv4 str
(string) IPv4 Address of the Load Balancer.
ipv6 str
(string) IPv6 Address of the Load Balancer.
network_id int
(int) ID of the first private network that this Load Balancer is connected to.
network_ip str
(string) IP of the Load Balancer in the first private network that it is connected to.
id String
The provider-assigned unique ID for this managed resource.
ipv4 String
(string) IPv4 Address of the Load Balancer.
ipv6 String
(string) IPv6 Address of the Load Balancer.
networkId Number
(int) ID of the first private network that this Load Balancer is connected to.
networkIp String
(string) IP of the Load Balancer in the first private network that it is connected to.

Look up Existing LoadBalancer Resource

Get an existing LoadBalancer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        algorithm: Optional[LoadBalancerAlgorithmArgs] = None,
        delete_protection: Optional[bool] = None,
        ipv4: Optional[str] = None,
        ipv6: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        load_balancer_type: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        network_id: Optional[int] = None,
        network_ip: Optional[str] = None,
        network_zone: Optional[str] = None,
        targets: Optional[Sequence[LoadBalancerTargetArgs]] = None) -> LoadBalancer
func GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)
public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state, CustomResourceOptions? opts = null)
public static LoadBalancer get(String name, Output<String> id, LoadBalancerState state, CustomResourceOptions options)
resources:  _:    type: hcloud:LoadBalancer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Algorithm Pulumi.HCloud.Inputs.LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
DeleteProtection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
Ipv4 string
(string) IPv4 Address of the Load Balancer.
Ipv6 string
(string) IPv6 Address of the Load Balancer.
Labels Dictionary<string, string>
User-defined labels (key-value pairs) should be created with.
LoadBalancerType string
Type of the Load Balancer.
Location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
Name string
Name of the Load Balancer.
NetworkId int
(int) ID of the first private network that this Load Balancer is connected to.
NetworkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
NetworkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
Targets List<Pulumi.HCloud.Inputs.LoadBalancerTarget>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

Algorithm LoadBalancerAlgorithmArgs
Configuration of the algorithm the Load Balancer use.
DeleteProtection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
Ipv4 string
(string) IPv4 Address of the Load Balancer.
Ipv6 string
(string) IPv6 Address of the Load Balancer.
Labels map[string]string
User-defined labels (key-value pairs) should be created with.
LoadBalancerType string
Type of the Load Balancer.
Location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
Name string
Name of the Load Balancer.
NetworkId int
(int) ID of the first private network that this Load Balancer is connected to.
NetworkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
NetworkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
Targets []LoadBalancerTargetTypeArgs

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

algorithm LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
deleteProtection Boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
ipv4 String
(string) IPv4 Address of the Load Balancer.
ipv6 String
(string) IPv6 Address of the Load Balancer.
labels Map<String,String>
User-defined labels (key-value pairs) should be created with.
loadBalancerType String
Type of the Load Balancer.
location Changes to this property will trigger replacement. String
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name String
Name of the Load Balancer.
networkId Integer
(int) ID of the first private network that this Load Balancer is connected to.
networkIp String
(string) IP of the Load Balancer in the first private network that it is connected to.
networkZone Changes to this property will trigger replacement. String
The Network Zone of the Load Balancer. Require when no location is set.
targets List<LoadBalancerTarget>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

algorithm LoadBalancerAlgorithm
Configuration of the algorithm the Load Balancer use.
deleteProtection boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
ipv4 string
(string) IPv4 Address of the Load Balancer.
ipv6 string
(string) IPv6 Address of the Load Balancer.
labels {[key: string]: string}
User-defined labels (key-value pairs) should be created with.
loadBalancerType string
Type of the Load Balancer.
location Changes to this property will trigger replacement. string
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name string
Name of the Load Balancer.
networkId number
(int) ID of the first private network that this Load Balancer is connected to.
networkIp string
(string) IP of the Load Balancer in the first private network that it is connected to.
networkZone Changes to this property will trigger replacement. string
The Network Zone of the Load Balancer. Require when no location is set.
targets LoadBalancerTarget[]

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

algorithm LoadBalancerAlgorithmArgs
Configuration of the algorithm the Load Balancer use.
delete_protection bool
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
ipv4 str
(string) IPv4 Address of the Load Balancer.
ipv6 str
(string) IPv6 Address of the Load Balancer.
labels Mapping[str, str]
User-defined labels (key-value pairs) should be created with.
load_balancer_type str
Type of the Load Balancer.
location Changes to this property will trigger replacement. str
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name str
Name of the Load Balancer.
network_id int
(int) ID of the first private network that this Load Balancer is connected to.
network_ip str
(string) IP of the Load Balancer in the first private network that it is connected to.
network_zone Changes to this property will trigger replacement. str
The Network Zone of the Load Balancer. Require when no location is set.
targets Sequence[LoadBalancerTargetArgs]

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

algorithm Property Map
Configuration of the algorithm the Load Balancer use.
deleteProtection Boolean
Enable or disable delete protection. See "Delete Protection" in the Provider Docs for details.
ipv4 String
(string) IPv4 Address of the Load Balancer.
ipv6 String
(string) IPv6 Address of the Load Balancer.
labels Map<String>
User-defined labels (key-value pairs) should be created with.
loadBalancerType String
Type of the Load Balancer.
location Changes to this property will trigger replacement. String
The location name of the Load Balancer. Require when no network_zone is set. See the Hetzner Docs for more details about locations.
name String
Name of the Load Balancer.
networkId Number
(int) ID of the first private network that this Load Balancer is connected to.
networkIp String
(string) IP of the Load Balancer in the first private network that it is connected to.
networkZone Changes to this property will trigger replacement. String
The Network Zone of the Load Balancer. Require when no location is set.
targets List<Property Map>

Deprecated: Use hcloud.LoadBalancerTarget resource instead. This allows the full control over the selected targets.

Supporting Types

LoadBalancerAlgorithm
, LoadBalancerAlgorithmArgs

Type string
Type of the Load Balancer Algorithm. round_robin or least_connections
Type string
Type of the Load Balancer Algorithm. round_robin or least_connections
type String
Type of the Load Balancer Algorithm. round_robin or least_connections
type string
Type of the Load Balancer Algorithm. round_robin or least_connections
type str
Type of the Load Balancer Algorithm. round_robin or least_connections
type String
Type of the Load Balancer Algorithm. round_robin or least_connections

LoadBalancerTarget
, LoadBalancerTargetArgs

Type This property is required. string
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
ServerId int
UsePrivateIp bool

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

Type This property is required. string
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
ServerId int
UsePrivateIp bool

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

type This property is required. String
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
serverId Integer
usePrivateIp Boolean

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

type This property is required. string
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
serverId number
usePrivateIp boolean

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

type This property is required. str
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
server_id int
use_private_ip bool

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

type This property is required. String
(string) Type of the Load Balancer Algorithm. round_robin or least_connections
serverId Number
usePrivateIp Boolean

Deprecated: Does not work. Use the hcloud.LoadBalancerTarget resource instead.

Import

Load Balancers can be imported using its id:

$ pulumi import hcloud:index/loadBalancer:LoadBalancer example "$LOAD_BALANCER_ID"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Hetzner Cloud pulumi/pulumi-hcloud
License
Apache-2.0
Notes
This Pulumi package is based on the hcloud Terraform Provider.