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
LookupLoadBalancerin the Go SDK.
public static class GetLoadBalancer {
public static Task<GetLoadBalancerResult> InvokeAsync(GetLoadBalancerArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetLoadBalancer Result
The following output properties are available:
- Algorithm string
- Droplet
Ids List<int> - Droplet
Tag string - Enable
Backend boolKeepalive - Enable
Proxy boolProtocol - Forwarding
Rules List<Pulumi.Digital Ocean. Outputs. Get Load Balancer Forwarding Rule> - Healthcheck
Pulumi.
Digital Ocean. Outputs. Get Load Balancer Healthcheck - Id string
The provider-assigned unique ID for this managed resource.
- Ip string
- Load
Balancer stringUrn - Name string
- Redirect
Http boolTo Https - Region string
- Status string
- Sticky
Sessions Pulumi.Digital Ocean. Outputs. Get Load Balancer Sticky Sessions - Vpc
Uuid string
- Algorithm string
- Droplet
Ids []int - Droplet
Tag string - Enable
Backend boolKeepalive - Enable
Proxy boolProtocol - Forwarding
Rules []GetLoad Balancer Forwarding Rule - Healthcheck
Get
Load Balancer Healthcheck - Id string
The provider-assigned unique ID for this managed resource.
- Ip string
- Load
Balancer stringUrn - Name string
- Redirect
Http boolTo Https - Region string
- Status string
- Sticky
Sessions GetLoad Balancer Sticky Sessions - Vpc
Uuid string
- algorithm string
- droplet
Ids number[] - droplet
Tag string - enable
Backend booleanKeepalive - enable
Proxy booleanProtocol - forwarding
Rules GetLoad Balancer Forwarding Rule[] - healthcheck
Get
Load Balancer Healthcheck - id string
The provider-assigned unique ID for this managed resource.
- ip string
- load
Balancer stringUrn - name string
- redirect
Http booleanTo Https - region string
- status string
- sticky
Sessions GetLoad Balancer Sticky Sessions - vpc
Uuid string
- algorithm str
- droplet_
ids List[Integer] - droplet_
tag str - enable_
backend_ boolkeepalive - enable_
proxy_ boolprotocol - forwarding_
rules List[GetLoad Balancer Forwarding Rule] - healthcheck
Dict[Get
Load Balancer Healthcheck] - id str
The provider-assigned unique ID for this managed resource.
- ip str
- load_
balancer_ strurn - name str
- redirect_
http_ boolto_ https - region str
- status str
- sticky_
sessions Dict[GetLoad Balancer Sticky Sessions] - 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.
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.
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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.