GetLoadBalancer

Get information on a load balancer for use in other resources. This data source provides all of the load balancers properties as configured on your DigitalOcean account. This is useful if the load balancer in question is not managed by this provider or you need to utilize any of the load balancers data.

An error is triggered if the provided load balancer name does not exist.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(DigitalOcean.GetLoadBalancer.InvokeAsync(new DigitalOcean.GetLoadBalancerArgs
        {
            Name = "app",
        }));
        this.LbOutput = example.Apply(example => example.Ip);
    }

    [Output("lbOutput")]
    public Output<string> LbOutput { get; set; }
}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_load_balancer(name="app")
pulumi.export("lbOutput", example.ip)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const example = digitalocean.getLoadBalancer({
    name: "app",
});
export const lbOutput = example.then(example => example.ip);

Using GetLoadBalancer

function getLoadBalancer(args: GetLoadBalancerArgs, opts?: InvokeOptions): Promise<GetLoadBalancerResult>
function  get_load_balancer(name=None, opts=None)
func LookupLoadBalancer(ctx *Context, args *LookupLoadBalancerArgs, opts ...InvokeOption) (*LookupLoadBalancerResult, error)

Note: This function is named LookupLoadBalancer in the Go SDK.

public static class GetLoadBalancer {
    public static Task<GetLoadBalancerResult> InvokeAsync(GetLoadBalancerArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of load balancer.

Name string

The name of load balancer.

name string

The name of load balancer.

name str

The name of load balancer.

GetLoadBalancer Result

The following output properties are available:

Algorithm string
DropletIds List<int>
DropletTag string
EnableBackendKeepalive bool
EnableProxyProtocol bool
ForwardingRules List<Pulumi.DigitalOcean.Outputs.GetLoadBalancerForwardingRule>
Healthcheck Pulumi.DigitalOcean.Outputs.GetLoadBalancerHealthcheck
Id string

The provider-assigned unique ID for this managed resource.

Ip string
LoadBalancerUrn string
Name string
RedirectHttpToHttps bool
Region string
Status string
StickySessions Pulumi.DigitalOcean.Outputs.GetLoadBalancerStickySessions
VpcUuid string
Algorithm string
DropletIds []int
DropletTag string
EnableBackendKeepalive bool
EnableProxyProtocol bool
ForwardingRules []GetLoadBalancerForwardingRule
Healthcheck GetLoadBalancerHealthcheck
Id string

The provider-assigned unique ID for this managed resource.

Ip string
LoadBalancerUrn string
Name string
RedirectHttpToHttps bool
Region string
Status string
StickySessions GetLoadBalancerStickySessions
VpcUuid string
algorithm string
dropletIds number[]
dropletTag string
enableBackendKeepalive boolean
enableProxyProtocol boolean
forwardingRules GetLoadBalancerForwardingRule[]
healthcheck GetLoadBalancerHealthcheck
id string

The provider-assigned unique ID for this managed resource.

ip string
loadBalancerUrn string
name string
redirectHttpToHttps boolean
region string
status string
stickySessions GetLoadBalancerStickySessions
vpcUuid string
algorithm str
droplet_ids List[Integer]
droplet_tag str
enable_backend_keepalive bool
enable_proxy_protocol bool
forwarding_rules List[GetLoadBalancerForwardingRule]
healthcheck Dict[GetLoadBalancerHealthcheck]
id str

The provider-assigned unique ID for this managed resource.

ip str
load_balancer_urn str
name str
redirect_http_to_https bool
region str
status str
sticky_sessions Dict[GetLoadBalancerStickySessions]
vpc_uuid str

Supporting Types

GetLoadBalancerForwardingRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CertificateId string
EntryPort int
EntryProtocol string
TargetPort int
TargetProtocol string
TlsPassthrough bool
CertificateId string
EntryPort int
EntryProtocol string
TargetPort int
TargetProtocol string
TlsPassthrough bool
certificateId string
entryPort number
entryProtocol string
targetPort number
targetProtocol string
tlsPassthrough boolean
certificate_id str
entryPort float
entryProtocol str
targetPort float
targetProtocol str
tlsPassthrough bool

GetLoadBalancerHealthcheck

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CheckIntervalSeconds int
HealthyThreshold int
Path string
Port int
Protocol string
ResponseTimeoutSeconds int
UnhealthyThreshold int
CheckIntervalSeconds int
HealthyThreshold int
Path string
Port int
Protocol string
ResponseTimeoutSeconds int
UnhealthyThreshold int
checkIntervalSeconds number
healthyThreshold number
path string
port number
protocol string
responseTimeoutSeconds number
unhealthyThreshold number
checkIntervalSeconds float
healthyThreshold float
path str
port float
protocol str
responseTimeoutSeconds float
unhealthyThreshold float

GetLoadBalancerStickySessions

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

CookieName string
CookieTtlSeconds int
Type string
CookieName string
CookieTtlSeconds int
Type string
cookieName string
cookieTtlSeconds number
type string
cookieName str
cookieTtlSeconds float
type str

Package Details

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