LoadBalancerService

Define services for Hetzner Cloud Load Balancers.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var loadBalancer = new HCloud.LoadBalancer("loadBalancer", new HCloud.LoadBalancerArgs
        {
            LoadBalancerType = "lb11",
            Location = "nbg1",
        });
        var loadBalancerService = new HCloud.LoadBalancerService("loadBalancerService", new HCloud.LoadBalancerServiceArgs
        {
            LoadBalancerId = hcloud_load_balancer.Test_load_balancer.Id,
            Protocol = "http",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := hcloud.NewLoadBalancer(ctx, "loadBalancer", &hcloud.LoadBalancerArgs{
            LoadBalancerType: pulumi.String("lb11"),
            Location:         pulumi.String("nbg1"),
        })
        if err != nil {
            return err
        }
        _, err = hcloud.NewLoadBalancerService(ctx, "loadBalancerService", &hcloud.LoadBalancerServiceArgs{
            LoadBalancerId: pulumi.Any(hcloud_load_balancer.Test_load_balancer.Id),
            Protocol:       pulumi.String("http"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_hcloud as hcloud

load_balancer = hcloud.LoadBalancer("loadBalancer",
    load_balancer_type="lb11",
    location="nbg1")
load_balancer_service = hcloud.LoadBalancerService("loadBalancerService",
    load_balancer_id=hcloud_load_balancer["test_load_balancer"]["id"],
    protocol="http")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const loadBalancer = new hcloud.LoadBalancer("loadBalancer", {
    loadBalancerType: "lb11",
    location: "nbg1",
});
const loadBalancerService = new hcloud.LoadBalancerService("loadBalancerService", {
    loadBalancerId: hcloud_load_balancer.test_load_balancer.id,
    protocol: "http",
});

Create a LoadBalancerService Resource

def LoadBalancerService(resource_name, opts=None, destination_port=None, health_check=None, http=None, listen_port=None, load_balancer_id=None, protocol=None, proxyprotocol=None, __props__=None);
name string
The unique name of the resource.
args LoadBalancerServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LoadBalancerServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancerService Resource Properties

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

Inputs

The LoadBalancerService resource accepts the following input properties:

LoadBalancerId string
Protocol string
DestinationPort int
HealthCheck Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheckArgs
Http Pulumi.HCloud.Inputs.LoadBalancerServiceHttpArgs
ListenPort int
Proxyprotocol bool
LoadBalancerId string
Protocol string
DestinationPort int
HealthCheck LoadBalancerServiceHealthCheck
Http LoadBalancerServiceHttp
ListenPort int
Proxyprotocol bool
loadBalancerId string
protocol string
destinationPort number
healthCheck LoadBalancerServiceHealthCheck
http LoadBalancerServiceHttp
listenPort number
proxyprotocol boolean
load_balancer_id str
protocol str
destination_port float
health_check Dict[LoadBalancerServiceHealthCheck]
http Dict[LoadBalancerServiceHttp]
listen_port float
proxyprotocol bool

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LoadBalancerService Resource

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

static get(resource_name, id, opts=None, destination_port=None, health_check=None, http=None, listen_port=None, load_balancer_id=None, protocol=None, proxyprotocol=None, __props__=None);
func GetLoadBalancerService(ctx *Context, name string, id IDInput, state *LoadBalancerServiceState, opts ...ResourceOption) (*LoadBalancerService, error)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:

DestinationPort int
HealthCheck Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheckArgs
Http Pulumi.HCloud.Inputs.LoadBalancerServiceHttpArgs
ListenPort int
LoadBalancerId string
Protocol string
Proxyprotocol bool
DestinationPort int
HealthCheck LoadBalancerServiceHealthCheck
Http LoadBalancerServiceHttp
ListenPort int
LoadBalancerId string
Protocol string
Proxyprotocol bool
destinationPort number
healthCheck LoadBalancerServiceHealthCheck
http LoadBalancerServiceHttp
listenPort number
loadBalancerId string
protocol string
proxyprotocol boolean
destination_port float
health_check Dict[LoadBalancerServiceHealthCheck]
http Dict[LoadBalancerServiceHttp]
listen_port float
load_balancer_id str
protocol str
proxyprotocol bool

Supporting Types

LoadBalancerServiceHealthCheck

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Interval int
Port int
Protocol string
Timeout int
Http Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheckHttpArgs
Retries int
Interval int
Port int
Protocol string
Timeout int
Http LoadBalancerServiceHealthCheckHttp
Retries int
interval number
port number
protocol string
timeout number
http LoadBalancerServiceHealthCheckHttp
retries number
interval float
port float
protocol str
timeout float
http Dict[LoadBalancerServiceHealthCheckHttp]
retries float

LoadBalancerServiceHealthCheckHttp

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

StatusCodes List<string>
Domain string
Path string
Response string
Tls bool
StatusCodes []string
Domain string
Path string
Response string
Tls bool
statusCodes string[]
domain string
path string
response string
tls boolean
statusCodes List[str]
domain str
path str
response str
tls bool

LoadBalancerServiceHttp

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Certificates List<int>
CookieLifetime int
CookieName string
RedirectHttp bool
StickySessions bool
Certificates []int
CookieLifetime int
CookieName string
RedirectHttp bool
StickySessions bool
certificates number[]
cookieLifetime number
cookieName string
redirectHttp boolean
stickySessions boolean
certificates List[Integer]
cookieLifetime float
cookieName str
redirectHttp bool
stickySessions bool

Package Details

Repository
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes
This Pulumi package is based on the hcloud Terraform Provider.