1. Packages
  2. Hcloud Provider
  3. API Docs
  4. LoadBalancerService
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

hcloud.LoadBalancerService

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Define services for Hetzner Cloud Load Balancers.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const loadBalancer = new hcloud.LoadBalancer("load_balancer", {
        name: "my-load-balancer",
        loadBalancerType: "lb11",
        location: "nbg1",
    });
    const loadBalancerService = new hcloud.LoadBalancerService("load_balancer_service", {
        loadBalancerId: loadBalancer.id,
        protocol: "http",
        http: {
            stickySessions: true,
            cookieName: "EXAMPLE_STICKY",
        },
        healthCheck: {
            protocol: "http",
            port: 80,
            interval: 10,
            timeout: 5,
            http: {
                domain: "example.com",
                path: "/healthz",
                response: "OK",
                tls: true,
                statusCodes: ["200"],
            },
        },
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    load_balancer = hcloud.LoadBalancer("load_balancer",
        name="my-load-balancer",
        load_balancer_type="lb11",
        location="nbg1")
    load_balancer_service = hcloud.LoadBalancerService("load_balancer_service",
        load_balancer_id=load_balancer.id,
        protocol="http",
        http={
            "sticky_sessions": True,
            "cookie_name": "EXAMPLE_STICKY",
        },
        health_check={
            "protocol": "http",
            "port": 80,
            "interval": 10,
            "timeout": 5,
            "http": {
                "domain": "example.com",
                "path": "/healthz",
                "response": "OK",
                "tls": True,
                "status_codes": ["200"],
            },
        })
    
    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 {
    		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.NewLoadBalancerService(ctx, "load_balancer_service", &hcloud.LoadBalancerServiceArgs{
    			LoadBalancerId: loadBalancer.ID(),
    			Protocol:       pulumi.String("http"),
    			Http: &hcloud.LoadBalancerServiceHttpArgs{
    				StickySessions: pulumi.Bool(true),
    				CookieName:     pulumi.String("EXAMPLE_STICKY"),
    			},
    			HealthCheck: &hcloud.LoadBalancerServiceHealthCheckArgs{
    				Protocol: pulumi.String("http"),
    				Port:     pulumi.Int(80),
    				Interval: pulumi.Int(10),
    				Timeout:  pulumi.Int(5),
    				Http: &hcloud.LoadBalancerServiceHealthCheckHttpArgs{
    					Domain:   pulumi.String("example.com"),
    					Path:     pulumi.String("/healthz"),
    					Response: pulumi.String("OK"),
    					Tls:      pulumi.Bool(true),
    					StatusCodes: pulumi.StringArray{
    						pulumi.String("200"),
    					},
    				},
    			},
    		})
    		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 loadBalancer = new HCloud.LoadBalancer("load_balancer", new()
        {
            Name = "my-load-balancer",
            LoadBalancerType = "lb11",
            Location = "nbg1",
        });
    
        var loadBalancerService = new HCloud.LoadBalancerService("load_balancer_service", new()
        {
            LoadBalancerId = loadBalancer.Id,
            Protocol = "http",
            Http = new HCloud.Inputs.LoadBalancerServiceHttpArgs
            {
                StickySessions = true,
                CookieName = "EXAMPLE_STICKY",
            },
            HealthCheck = new HCloud.Inputs.LoadBalancerServiceHealthCheckArgs
            {
                Protocol = "http",
                Port = 80,
                Interval = 10,
                Timeout = 5,
                Http = new HCloud.Inputs.LoadBalancerServiceHealthCheckHttpArgs
                {
                    Domain = "example.com",
                    Path = "/healthz",
                    Response = "OK",
                    Tls = true,
                    StatusCodes = new[]
                    {
                        "200",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hcloud.LoadBalancer;
    import com.pulumi.hcloud.LoadBalancerArgs;
    import com.pulumi.hcloud.LoadBalancerService;
    import com.pulumi.hcloud.LoadBalancerServiceArgs;
    import com.pulumi.hcloud.inputs.LoadBalancerServiceHttpArgs;
    import com.pulumi.hcloud.inputs.LoadBalancerServiceHealthCheckArgs;
    import com.pulumi.hcloud.inputs.LoadBalancerServiceHealthCheckHttpArgs;
    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 loadBalancer = new LoadBalancer("loadBalancer", LoadBalancerArgs.builder()
                .name("my-load-balancer")
                .loadBalancerType("lb11")
                .location("nbg1")
                .build());
    
            var loadBalancerService = new LoadBalancerService("loadBalancerService", LoadBalancerServiceArgs.builder()
                .loadBalancerId(loadBalancer.id())
                .protocol("http")
                .http(LoadBalancerServiceHttpArgs.builder()
                    .stickySessions(true)
                    .cookieName("EXAMPLE_STICKY")
                    .build())
                .healthCheck(LoadBalancerServiceHealthCheckArgs.builder()
                    .protocol("http")
                    .port(80)
                    .interval(10)
                    .timeout(5)
                    .http(LoadBalancerServiceHealthCheckHttpArgs.builder()
                        .domain("example.com")
                        .path("/healthz")
                        .response("OK")
                        .tls(true)
                        .statusCodes("200")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      loadBalancer:
        type: hcloud:LoadBalancer
        name: load_balancer
        properties:
          name: my-load-balancer
          loadBalancerType: lb11
          location: nbg1
      loadBalancerService:
        type: hcloud:LoadBalancerService
        name: load_balancer_service
        properties:
          loadBalancerId: ${loadBalancer.id}
          protocol: http
          http:
            stickySessions: true
            cookieName: EXAMPLE_STICKY
          healthCheck:
            protocol: http
            port: 80
            interval: 10
            timeout: 5
            http:
              domain: example.com
              path: /healthz
              response: OK
              tls: true
              statusCodes:
                - '200'
    

    Create LoadBalancerService Resource

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

    Constructor syntax

    new LoadBalancerService(name: string, args: LoadBalancerServiceArgs, opts?: CustomResourceOptions);
    @overload
    def LoadBalancerService(resource_name: str,
                            args: LoadBalancerServiceArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def LoadBalancerService(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            load_balancer_id: Optional[str] = None,
                            protocol: Optional[str] = None,
                            destination_port: Optional[int] = None,
                            health_check: Optional[LoadBalancerServiceHealthCheckArgs] = None,
                            http: Optional[LoadBalancerServiceHttpArgs] = None,
                            listen_port: Optional[int] = None,
                            proxyprotocol: Optional[bool] = None)
    func NewLoadBalancerService(ctx *Context, name string, args LoadBalancerServiceArgs, opts ...ResourceOption) (*LoadBalancerService, error)
    public LoadBalancerService(string name, LoadBalancerServiceArgs args, CustomResourceOptions? opts = null)
    public LoadBalancerService(String name, LoadBalancerServiceArgs args)
    public LoadBalancerService(String name, LoadBalancerServiceArgs args, CustomResourceOptions options)
    
    type: hcloud:LoadBalancerService
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args LoadBalancerServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args LoadBalancerServiceArgs
    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 loadBalancerServiceResource = new HCloud.LoadBalancerService("loadBalancerServiceResource", new()
    {
        LoadBalancerId = "string",
        Protocol = "string",
        DestinationPort = 0,
        HealthCheck = new HCloud.Inputs.LoadBalancerServiceHealthCheckArgs
        {
            Interval = 0,
            Port = 0,
            Protocol = "string",
            Timeout = 0,
            Http = new HCloud.Inputs.LoadBalancerServiceHealthCheckHttpArgs
            {
                Domain = "string",
                Path = "string",
                Response = "string",
                StatusCodes = new[]
                {
                    "string",
                },
                Tls = false,
            },
            Retries = 0,
        },
        Http = new HCloud.Inputs.LoadBalancerServiceHttpArgs
        {
            Certificates = new[]
            {
                0,
            },
            CookieLifetime = 0,
            CookieName = "string",
            RedirectHttp = false,
            StickySessions = false,
        },
        ListenPort = 0,
        Proxyprotocol = false,
    });
    
    example, err := hcloud.NewLoadBalancerService(ctx, "loadBalancerServiceResource", &hcloud.LoadBalancerServiceArgs{
    	LoadBalancerId:  pulumi.String("string"),
    	Protocol:        pulumi.String("string"),
    	DestinationPort: pulumi.Int(0),
    	HealthCheck: &hcloud.LoadBalancerServiceHealthCheckArgs{
    		Interval: pulumi.Int(0),
    		Port:     pulumi.Int(0),
    		Protocol: pulumi.String("string"),
    		Timeout:  pulumi.Int(0),
    		Http: &hcloud.LoadBalancerServiceHealthCheckHttpArgs{
    			Domain:   pulumi.String("string"),
    			Path:     pulumi.String("string"),
    			Response: pulumi.String("string"),
    			StatusCodes: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Tls: pulumi.Bool(false),
    		},
    		Retries: pulumi.Int(0),
    	},
    	Http: &hcloud.LoadBalancerServiceHttpArgs{
    		Certificates: pulumi.IntArray{
    			pulumi.Int(0),
    		},
    		CookieLifetime: pulumi.Int(0),
    		CookieName:     pulumi.String("string"),
    		RedirectHttp:   pulumi.Bool(false),
    		StickySessions: pulumi.Bool(false),
    	},
    	ListenPort:    pulumi.Int(0),
    	Proxyprotocol: pulumi.Bool(false),
    })
    
    var loadBalancerServiceResource = new LoadBalancerService("loadBalancerServiceResource", LoadBalancerServiceArgs.builder()
        .loadBalancerId("string")
        .protocol("string")
        .destinationPort(0)
        .healthCheck(LoadBalancerServiceHealthCheckArgs.builder()
            .interval(0)
            .port(0)
            .protocol("string")
            .timeout(0)
            .http(LoadBalancerServiceHealthCheckHttpArgs.builder()
                .domain("string")
                .path("string")
                .response("string")
                .statusCodes("string")
                .tls(false)
                .build())
            .retries(0)
            .build())
        .http(LoadBalancerServiceHttpArgs.builder()
            .certificates(0)
            .cookieLifetime(0)
            .cookieName("string")
            .redirectHttp(false)
            .stickySessions(false)
            .build())
        .listenPort(0)
        .proxyprotocol(false)
        .build());
    
    load_balancer_service_resource = hcloud.LoadBalancerService("loadBalancerServiceResource",
        load_balancer_id="string",
        protocol="string",
        destination_port=0,
        health_check={
            "interval": 0,
            "port": 0,
            "protocol": "string",
            "timeout": 0,
            "http": {
                "domain": "string",
                "path": "string",
                "response": "string",
                "status_codes": ["string"],
                "tls": False,
            },
            "retries": 0,
        },
        http={
            "certificates": [0],
            "cookie_lifetime": 0,
            "cookie_name": "string",
            "redirect_http": False,
            "sticky_sessions": False,
        },
        listen_port=0,
        proxyprotocol=False)
    
    const loadBalancerServiceResource = new hcloud.LoadBalancerService("loadBalancerServiceResource", {
        loadBalancerId: "string",
        protocol: "string",
        destinationPort: 0,
        healthCheck: {
            interval: 0,
            port: 0,
            protocol: "string",
            timeout: 0,
            http: {
                domain: "string",
                path: "string",
                response: "string",
                statusCodes: ["string"],
                tls: false,
            },
            retries: 0,
        },
        http: {
            certificates: [0],
            cookieLifetime: 0,
            cookieName: "string",
            redirectHttp: false,
            stickySessions: false,
        },
        listenPort: 0,
        proxyprotocol: false,
    });
    
    type: hcloud:LoadBalancerService
    properties:
        destinationPort: 0
        healthCheck:
            http:
                domain: string
                path: string
                response: string
                statusCodes:
                    - string
                tls: false
            interval: 0
            port: 0
            protocol: string
            retries: 0
            timeout: 0
        http:
            certificates:
                - 0
            cookieLifetime: 0
            cookieName: string
            redirectHttp: false
            stickySessions: false
        listenPort: 0
        loadBalancerId: string
        protocol: string
        proxyprotocol: false
    

    LoadBalancerService 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 LoadBalancerService resource accepts the following input properties:

    LoadBalancerId string
    Id of the load balancer this service belongs to.
    Protocol string
    Protocol of the service. http, https or tcp
    DestinationPort int
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    HealthCheck Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    Http Pulumi.HCloud.Inputs.LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    ListenPort int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    Proxyprotocol bool
    Enable proxyprotocol.
    LoadBalancerId string
    Id of the load balancer this service belongs to.
    Protocol string
    Protocol of the service. http, https or tcp
    DestinationPort int
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    HealthCheck LoadBalancerServiceHealthCheckArgs
    Health Check configuration when protocol is http or https.
    Http LoadBalancerServiceHttpArgs
    HTTP configuration when protocol is http or https.
    ListenPort int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    Proxyprotocol bool
    Enable proxyprotocol.
    loadBalancerId String
    Id of the load balancer this service belongs to.
    protocol String
    Protocol of the service. http, https or tcp
    destinationPort Integer
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    listenPort Integer
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    proxyprotocol Boolean
    Enable proxyprotocol.
    loadBalancerId string
    Id of the load balancer this service belongs to.
    protocol string
    Protocol of the service. http, https or tcp
    destinationPort number
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    listenPort number
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    proxyprotocol boolean
    Enable proxyprotocol.
    load_balancer_id str
    Id of the load balancer this service belongs to.
    protocol str
    Protocol of the service. http, https or tcp
    destination_port int
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    health_check LoadBalancerServiceHealthCheckArgs
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttpArgs
    HTTP configuration when protocol is http or https.
    listen_port int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    proxyprotocol bool
    Enable proxyprotocol.
    loadBalancerId String
    Id of the load balancer this service belongs to.
    protocol String
    Protocol of the service. http, https or tcp
    destinationPort Number
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck Property Map
    Health Check configuration when protocol is http or https.
    http Property Map
    HTTP configuration when protocol is http or https.
    listenPort Number
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    proxyprotocol Boolean
    Enable proxyprotocol.

    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LoadBalancerService Resource

    Get an existing LoadBalancerService 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?: LoadBalancerServiceState, opts?: CustomResourceOptions): LoadBalancerService
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            destination_port: Optional[int] = None,
            health_check: Optional[LoadBalancerServiceHealthCheckArgs] = None,
            http: Optional[LoadBalancerServiceHttpArgs] = None,
            listen_port: Optional[int] = None,
            load_balancer_id: Optional[str] = None,
            protocol: Optional[str] = None,
            proxyprotocol: Optional[bool] = None) -> LoadBalancerService
    func GetLoadBalancerService(ctx *Context, name string, id IDInput, state *LoadBalancerServiceState, opts ...ResourceOption) (*LoadBalancerService, error)
    public static LoadBalancerService Get(string name, Input<string> id, LoadBalancerServiceState? state, CustomResourceOptions? opts = null)
    public static LoadBalancerService get(String name, Output<String> id, LoadBalancerServiceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    HealthCheck Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    Http Pulumi.HCloud.Inputs.LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    ListenPort int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    LoadBalancerId string
    Id of the load balancer this service belongs to.
    Protocol string
    Protocol of the service. http, https or tcp
    Proxyprotocol bool
    Enable proxyprotocol.
    DestinationPort int
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    HealthCheck LoadBalancerServiceHealthCheckArgs
    Health Check configuration when protocol is http or https.
    Http LoadBalancerServiceHttpArgs
    HTTP configuration when protocol is http or https.
    ListenPort int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    LoadBalancerId string
    Id of the load balancer this service belongs to.
    Protocol string
    Protocol of the service. http, https or tcp
    Proxyprotocol bool
    Enable proxyprotocol.
    destinationPort Integer
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    listenPort Integer
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    loadBalancerId String
    Id of the load balancer this service belongs to.
    protocol String
    Protocol of the service. http, https or tcp
    proxyprotocol Boolean
    Enable proxyprotocol.
    destinationPort number
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck LoadBalancerServiceHealthCheck
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttp
    HTTP configuration when protocol is http or https.
    listenPort number
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    loadBalancerId string
    Id of the load balancer this service belongs to.
    protocol string
    Protocol of the service. http, https or tcp
    proxyprotocol boolean
    Enable proxyprotocol.
    destination_port int
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    health_check LoadBalancerServiceHealthCheckArgs
    Health Check configuration when protocol is http or https.
    http LoadBalancerServiceHttpArgs
    HTTP configuration when protocol is http or https.
    listen_port int
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    load_balancer_id str
    Id of the load balancer this service belongs to.
    protocol str
    Protocol of the service. http, https or tcp
    proxyprotocol bool
    Enable proxyprotocol.
    destinationPort Number
    Port the service connects to the targets on, required if protocol is tcp. Can be everything between 1 and 65535.
    healthCheck Property Map
    Health Check configuration when protocol is http or https.
    http Property Map
    HTTP configuration when protocol is http or https.
    listenPort Number
    Port the service listen on, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    loadBalancerId String
    Id of the load balancer this service belongs to.
    protocol String
    Protocol of the service. http, https or tcp
    proxyprotocol Boolean
    Enable proxyprotocol.

    Supporting Types

    LoadBalancerServiceHealthCheck, LoadBalancerServiceHealthCheckArgs

    Interval int
    Interval how often the health check will be performed, in seconds.
    Port int
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    Protocol string
    Protocol the health check uses. http or tcp
    Timeout int
    Timeout when a health check try will be canceled if there is no response, in seconds.
    Http Pulumi.HCloud.Inputs.LoadBalancerServiceHealthCheckHttp
    HTTP configuration. Required if protocol is http.
    Retries int
    Number of tries a health check will be performed until a target will be listed as unhealthy.
    Interval int
    Interval how often the health check will be performed, in seconds.
    Port int
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    Protocol string
    Protocol the health check uses. http or tcp
    Timeout int
    Timeout when a health check try will be canceled if there is no response, in seconds.
    Http LoadBalancerServiceHealthCheckHttp
    HTTP configuration. Required if protocol is http.
    Retries int
    Number of tries a health check will be performed until a target will be listed as unhealthy.
    interval Integer
    Interval how often the health check will be performed, in seconds.
    port Integer
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    protocol String
    Protocol the health check uses. http or tcp
    timeout Integer
    Timeout when a health check try will be canceled if there is no response, in seconds.
    http LoadBalancerServiceHealthCheckHttp
    HTTP configuration. Required if protocol is http.
    retries Integer
    Number of tries a health check will be performed until a target will be listed as unhealthy.
    interval number
    Interval how often the health check will be performed, in seconds.
    port number
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    protocol string
    Protocol the health check uses. http or tcp
    timeout number
    Timeout when a health check try will be canceled if there is no response, in seconds.
    http LoadBalancerServiceHealthCheckHttp
    HTTP configuration. Required if protocol is http.
    retries number
    Number of tries a health check will be performed until a target will be listed as unhealthy.
    interval int
    Interval how often the health check will be performed, in seconds.
    port int
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    protocol str
    Protocol the health check uses. http or tcp
    timeout int
    Timeout when a health check try will be canceled if there is no response, in seconds.
    http LoadBalancerServiceHealthCheckHttp
    HTTP configuration. Required if protocol is http.
    retries int
    Number of tries a health check will be performed until a target will be listed as unhealthy.
    interval Number
    Interval how often the health check will be performed, in seconds.
    port Number
    Port the health check tries to connect to, required if protocol is tcp. Can be everything between 1 and 65535. Must be unique per Load Balancer.
    protocol String
    Protocol the health check uses. http or tcp
    timeout Number
    Timeout when a health check try will be canceled if there is no response, in seconds.
    http Property Map
    HTTP configuration. Required if protocol is http.
    retries Number
    Number of tries a health check will be performed until a target will be listed as unhealthy.

    LoadBalancerServiceHealthCheckHttp, LoadBalancerServiceHealthCheckHttpArgs

    Domain string
    Domain we try to access when performing the Health Check.
    Path string
    Path we try to access when performing the Health Check.
    Response string
    Response we expect to be included in the Target response when a Health Check was performed.
    StatusCodes List<string>
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    Tls bool
    Enable TLS certificate checking.
    Domain string
    Domain we try to access when performing the Health Check.
    Path string
    Path we try to access when performing the Health Check.
    Response string
    Response we expect to be included in the Target response when a Health Check was performed.
    StatusCodes []string
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    Tls bool
    Enable TLS certificate checking.
    domain String
    Domain we try to access when performing the Health Check.
    path String
    Path we try to access when performing the Health Check.
    response String
    Response we expect to be included in the Target response when a Health Check was performed.
    statusCodes List<String>
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    tls Boolean
    Enable TLS certificate checking.
    domain string
    Domain we try to access when performing the Health Check.
    path string
    Path we try to access when performing the Health Check.
    response string
    Response we expect to be included in the Target response when a Health Check was performed.
    statusCodes string[]
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    tls boolean
    Enable TLS certificate checking.
    domain str
    Domain we try to access when performing the Health Check.
    path str
    Path we try to access when performing the Health Check.
    response str
    Response we expect to be included in the Target response when a Health Check was performed.
    status_codes Sequence[str]
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    tls bool
    Enable TLS certificate checking.
    domain String
    Domain we try to access when performing the Health Check.
    path String
    Path we try to access when performing the Health Check.
    response String
    Response we expect to be included in the Target response when a Health Check was performed.
    statusCodes List<String>
    We expect that the target answers with these status codes. If not the target is marked as unhealthy.
    tls Boolean
    Enable TLS certificate checking.

    LoadBalancerServiceHttp, LoadBalancerServiceHttpArgs

    Certificates List<int>
    List of IDs from certificates which the Load Balancer has.
    CookieLifetime int
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    CookieName string
    Name of the cookie for sticky session. Default: HCLBSTICKY
    RedirectHttp bool
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    StickySessions bool
    Enable sticky sessions
    Certificates []int
    List of IDs from certificates which the Load Balancer has.
    CookieLifetime int
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    CookieName string
    Name of the cookie for sticky session. Default: HCLBSTICKY
    RedirectHttp bool
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    StickySessions bool
    Enable sticky sessions
    certificates List<Integer>
    List of IDs from certificates which the Load Balancer has.
    cookieLifetime Integer
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    cookieName String
    Name of the cookie for sticky session. Default: HCLBSTICKY
    redirectHttp Boolean
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    stickySessions Boolean
    Enable sticky sessions
    certificates number[]
    List of IDs from certificates which the Load Balancer has.
    cookieLifetime number
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    cookieName string
    Name of the cookie for sticky session. Default: HCLBSTICKY
    redirectHttp boolean
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    stickySessions boolean
    Enable sticky sessions
    certificates Sequence[int]
    List of IDs from certificates which the Load Balancer has.
    cookie_lifetime int
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    cookie_name str
    Name of the cookie for sticky session. Default: HCLBSTICKY
    redirect_http bool
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    sticky_sessions bool
    Enable sticky sessions
    certificates List<Number>
    List of IDs from certificates which the Load Balancer has.
    cookieLifetime Number
    Lifetime of the cookie for sticky session (in seconds). Default: 300
    cookieName String
    Name of the cookie for sticky session. Default: HCLBSTICKY
    redirectHttp Boolean
    Redirect HTTP to HTTPS traffic. Only supported for services with protocol https using the default HTTP port 80.
    stickySessions Boolean
    Enable sticky sessions

    Import

    Load Balancer Service entries can be imported using a compound ID with the following format:

    <load-balancer-id>__<listen-port>

    $ pulumi import hcloud:index/loadBalancerService:LoadBalancerService myloadbalancernetwork 123__80
    

    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.
    hcloud logo
    Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi