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
new LoadBalancerService(name: string, args: LoadBalancerServiceArgs, opts?: CustomResourceOptions);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);func NewLoadBalancerService(ctx *Context, name string, args LoadBalancerServiceArgs, opts ...ResourceOption) (*LoadBalancerService, error)public LoadBalancerService(string name, LoadBalancerServiceArgs args, CustomResourceOptions? opts = null)- 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:
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancerService resource produces the following output properties:
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.
public static get(name: string, id: Input<ID>, state?: LoadBalancerServiceState, opts?: CustomResourceOptions): LoadBalancerServicestatic 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)public static LoadBalancerService Get(string name, Input<string> id, LoadBalancerServiceState? state, CustomResourceOptions? opts = null)- 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:
Supporting Types
LoadBalancerServiceHealthCheck
LoadBalancerServiceHealthCheckHttp
LoadBalancerServiceHttp
Package Details
- Repository
- https://github.com/pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.