1. Packages
  2. DigitalOcean
  3. API Docs
  4. LoadBalancer
DigitalOcean v4.22.0 published on Friday, Sep 22, 2023 by Pulumi

digitalocean.LoadBalancer

Explore with Pulumi AI

digitalocean logo
DigitalOcean v4.22.0 published on Friday, Sep 22, 2023 by Pulumi

    Provides a DigitalOcean Load Balancer resource. This can be used to create, modify, and delete Load Balancers.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var web = new DigitalOcean.Droplet("web", new()
        {
            Size = "s-1vcpu-1gb",
            Image = "ubuntu-18-04-x64",
            Region = "nyc3",
        });
    
        var @public = new DigitalOcean.LoadBalancer("public", new()
        {
            Region = "nyc3",
            ForwardingRules = new[]
            {
                new DigitalOcean.Inputs.LoadBalancerForwardingRuleArgs
                {
                    EntryPort = 80,
                    EntryProtocol = "http",
                    TargetPort = 80,
                    TargetProtocol = "http",
                },
            },
            Healthcheck = new DigitalOcean.Inputs.LoadBalancerHealthcheckArgs
            {
                Port = 22,
                Protocol = "tcp",
            },
            DropletIds = new[]
            {
                web.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		web, err := digitalocean.NewDroplet(ctx, "web", &digitalocean.DropletArgs{
    			Size:   pulumi.String("s-1vcpu-1gb"),
    			Image:  pulumi.String("ubuntu-18-04-x64"),
    			Region: pulumi.String("nyc3"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewLoadBalancer(ctx, "public", &digitalocean.LoadBalancerArgs{
    			Region: pulumi.String("nyc3"),
    			ForwardingRules: digitalocean.LoadBalancerForwardingRuleArray{
    				&digitalocean.LoadBalancerForwardingRuleArgs{
    					EntryPort:      pulumi.Int(80),
    					EntryProtocol:  pulumi.String("http"),
    					TargetPort:     pulumi.Int(80),
    					TargetProtocol: pulumi.String("http"),
    				},
    			},
    			Healthcheck: &digitalocean.LoadBalancerHealthcheckArgs{
    				Port:     pulumi.Int(22),
    				Protocol: pulumi.String("tcp"),
    			},
    			DropletIds: pulumi.IntArray{
    				web.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.Droplet;
    import com.pulumi.digitalocean.DropletArgs;
    import com.pulumi.digitalocean.LoadBalancer;
    import com.pulumi.digitalocean.LoadBalancerArgs;
    import com.pulumi.digitalocean.inputs.LoadBalancerForwardingRuleArgs;
    import com.pulumi.digitalocean.inputs.LoadBalancerHealthcheckArgs;
    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 web = new Droplet("web", DropletArgs.builder()        
                .size("s-1vcpu-1gb")
                .image("ubuntu-18-04-x64")
                .region("nyc3")
                .build());
    
            var public_ = new LoadBalancer("public", LoadBalancerArgs.builder()        
                .region("nyc3")
                .forwardingRules(LoadBalancerForwardingRuleArgs.builder()
                    .entryPort(80)
                    .entryProtocol("http")
                    .targetPort(80)
                    .targetProtocol("http")
                    .build())
                .healthcheck(LoadBalancerHealthcheckArgs.builder()
                    .port(22)
                    .protocol("tcp")
                    .build())
                .dropletIds(web.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    web = digitalocean.Droplet("web",
        size="s-1vcpu-1gb",
        image="ubuntu-18-04-x64",
        region="nyc3")
    public = digitalocean.LoadBalancer("public",
        region="nyc3",
        forwarding_rules=[digitalocean.LoadBalancerForwardingRuleArgs(
            entry_port=80,
            entry_protocol="http",
            target_port=80,
            target_protocol="http",
        )],
        healthcheck=digitalocean.LoadBalancerHealthcheckArgs(
            port=22,
            protocol="tcp",
        ),
        droplet_ids=[web.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const web = new digitalocean.Droplet("web", {
        size: "s-1vcpu-1gb",
        image: "ubuntu-18-04-x64",
        region: "nyc3",
    });
    const _public = new digitalocean.LoadBalancer("public", {
        region: "nyc3",
        forwardingRules: [{
            entryPort: 80,
            entryProtocol: "http",
            targetPort: 80,
            targetProtocol: "http",
        }],
        healthcheck: {
            port: 22,
            protocol: "tcp",
        },
        dropletIds: [web.id],
    });
    
    resources:
      web:
        type: digitalocean:Droplet
        properties:
          size: s-1vcpu-1gb
          image: ubuntu-18-04-x64
          region: nyc3
      public:
        type: digitalocean:LoadBalancer
        properties:
          region: nyc3
          forwardingRules:
            - entryPort: 80
              entryProtocol: http
              targetPort: 80
              targetProtocol: http
          healthcheck:
            port: 22
            protocol: tcp
          dropletIds:
            - ${web.id}
    

    as there cannot be multiple certificates with the same name in an account.

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var cert = new DigitalOcean.Certificate("cert", new()
        {
            PrivateKey = "file('key.pem')",
            LeafCertificate = "file('cert.pem')",
        });
    
        var web = new DigitalOcean.Droplet("web", new()
        {
            Size = "s-1vcpu-1gb",
            Image = "ubuntu-18-04-x64",
            Region = "nyc3",
        });
    
        var @public = new DigitalOcean.LoadBalancer("public", new()
        {
            Region = "nyc3",
            ForwardingRules = new[]
            {
                new DigitalOcean.Inputs.LoadBalancerForwardingRuleArgs
                {
                    EntryPort = 443,
                    EntryProtocol = "https",
                    TargetPort = 80,
                    TargetProtocol = "http",
                    CertificateName = cert.Name,
                },
            },
            Healthcheck = new DigitalOcean.Inputs.LoadBalancerHealthcheckArgs
            {
                Port = 22,
                Protocol = "tcp",
            },
            DropletIds = new[]
            {
                web.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cert, err := digitalocean.NewCertificate(ctx, "cert", &digitalocean.CertificateArgs{
    			PrivateKey:      pulumi.String("file('key.pem')"),
    			LeafCertificate: pulumi.String("file('cert.pem')"),
    		})
    		if err != nil {
    			return err
    		}
    		web, err := digitalocean.NewDroplet(ctx, "web", &digitalocean.DropletArgs{
    			Size:   pulumi.String("s-1vcpu-1gb"),
    			Image:  pulumi.String("ubuntu-18-04-x64"),
    			Region: pulumi.String("nyc3"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = digitalocean.NewLoadBalancer(ctx, "public", &digitalocean.LoadBalancerArgs{
    			Region: pulumi.String("nyc3"),
    			ForwardingRules: digitalocean.LoadBalancerForwardingRuleArray{
    				&digitalocean.LoadBalancerForwardingRuleArgs{
    					EntryPort:       pulumi.Int(443),
    					EntryProtocol:   pulumi.String("https"),
    					TargetPort:      pulumi.Int(80),
    					TargetProtocol:  pulumi.String("http"),
    					CertificateName: cert.Name,
    				},
    			},
    			Healthcheck: &digitalocean.LoadBalancerHealthcheckArgs{
    				Port:     pulumi.Int(22),
    				Protocol: pulumi.String("tcp"),
    			},
    			DropletIds: pulumi.IntArray{
    				web.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.digitalocean.Certificate;
    import com.pulumi.digitalocean.CertificateArgs;
    import com.pulumi.digitalocean.Droplet;
    import com.pulumi.digitalocean.DropletArgs;
    import com.pulumi.digitalocean.LoadBalancer;
    import com.pulumi.digitalocean.LoadBalancerArgs;
    import com.pulumi.digitalocean.inputs.LoadBalancerForwardingRuleArgs;
    import com.pulumi.digitalocean.inputs.LoadBalancerHealthcheckArgs;
    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 cert = new Certificate("cert", CertificateArgs.builder()        
                .privateKey("file('key.pem')")
                .leafCertificate("file('cert.pem')")
                .build());
    
            var web = new Droplet("web", DropletArgs.builder()        
                .size("s-1vcpu-1gb")
                .image("ubuntu-18-04-x64")
                .region("nyc3")
                .build());
    
            var public_ = new LoadBalancer("public", LoadBalancerArgs.builder()        
                .region("nyc3")
                .forwardingRules(LoadBalancerForwardingRuleArgs.builder()
                    .entryPort(443)
                    .entryProtocol("https")
                    .targetPort(80)
                    .targetProtocol("http")
                    .certificateName(cert.name())
                    .build())
                .healthcheck(LoadBalancerHealthcheckArgs.builder()
                    .port(22)
                    .protocol("tcp")
                    .build())
                .dropletIds(web.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    cert = digitalocean.Certificate("cert",
        private_key="file('key.pem')",
        leaf_certificate="file('cert.pem')")
    web = digitalocean.Droplet("web",
        size="s-1vcpu-1gb",
        image="ubuntu-18-04-x64",
        region="nyc3")
    public = digitalocean.LoadBalancer("public",
        region="nyc3",
        forwarding_rules=[digitalocean.LoadBalancerForwardingRuleArgs(
            entry_port=443,
            entry_protocol="https",
            target_port=80,
            target_protocol="http",
            certificate_name=cert.name,
        )],
        healthcheck=digitalocean.LoadBalancerHealthcheckArgs(
            port=22,
            protocol="tcp",
        ),
        droplet_ids=[web.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const cert = new digitalocean.Certificate("cert", {
        privateKey: "file('key.pem')",
        leafCertificate: "file('cert.pem')",
    });
    const web = new digitalocean.Droplet("web", {
        size: "s-1vcpu-1gb",
        image: "ubuntu-18-04-x64",
        region: "nyc3",
    });
    const _public = new digitalocean.LoadBalancer("public", {
        region: "nyc3",
        forwardingRules: [{
            entryPort: 443,
            entryProtocol: "https",
            targetPort: 80,
            targetProtocol: "http",
            certificateName: cert.name,
        }],
        healthcheck: {
            port: 22,
            protocol: "tcp",
        },
        dropletIds: [web.id],
    });
    
    resources:
      cert:
        type: digitalocean:Certificate
        properties:
          privateKey: file('key.pem')
          leafCertificate: file('cert.pem')
      web:
        type: digitalocean:Droplet
        properties:
          size: s-1vcpu-1gb
          image: ubuntu-18-04-x64
          region: nyc3
      public:
        type: digitalocean:LoadBalancer
        properties:
          region: nyc3
          forwardingRules:
            - entryPort: 443
              entryProtocol: https
              targetPort: 80
              targetProtocol: http
              certificateName: ${cert.name}
          healthcheck:
            port: 22
            protocol: tcp
          dropletIds:
            - ${web.id}
    

    Create LoadBalancer Resource

    new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
    @overload
    def LoadBalancer(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     algorithm: Optional[Union[str, Algorithm]] = None,
                     disable_lets_encrypt_dns_records: Optional[bool] = None,
                     droplet_ids: Optional[Sequence[int]] = None,
                     droplet_tag: Optional[str] = None,
                     enable_backend_keepalive: Optional[bool] = None,
                     enable_proxy_protocol: Optional[bool] = None,
                     firewall: Optional[LoadBalancerFirewallArgs] = None,
                     forwarding_rules: Optional[Sequence[LoadBalancerForwardingRuleArgs]] = None,
                     healthcheck: Optional[LoadBalancerHealthcheckArgs] = None,
                     http_idle_timeout_seconds: Optional[int] = None,
                     name: Optional[str] = None,
                     project_id: Optional[str] = None,
                     redirect_http_to_https: Optional[bool] = None,
                     region: Optional[Union[str, Region]] = None,
                     size: Optional[str] = None,
                     size_unit: Optional[int] = None,
                     sticky_sessions: Optional[LoadBalancerStickySessionsArgs] = None,
                     vpc_uuid: Optional[str] = None)
    @overload
    def LoadBalancer(resource_name: str,
                     args: LoadBalancerArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
    public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
    public LoadBalancer(String name, LoadBalancerArgs args)
    public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
    
    type: digitalocean:LoadBalancer
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args LoadBalancerArgs
    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 LoadBalancerArgs
    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 LoadBalancerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LoadBalancerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LoadBalancerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    LoadBalancer Resource Properties

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

    Inputs

    The LoadBalancer resource accepts the following input properties:

    ForwardingRules List<Pulumi.DigitalOcean.Inputs.LoadBalancerForwardingRule>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    Region string | Pulumi.DigitalOcean.Region

    The region to start in

    Algorithm string | Pulumi.DigitalOcean.Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    DisableLetsEncryptDnsRecords bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    DropletIds List<int>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    DropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    EnableBackendKeepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    EnableProxyProtocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    Firewall Pulumi.DigitalOcean.Inputs.LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    Healthcheck Pulumi.DigitalOcean.Inputs.LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    HttpIdleTimeoutSeconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    Name string

    The Load Balancer name

    ProjectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    RedirectHttpToHttps bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    Size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    SizeUnit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    StickySessions Pulumi.DigitalOcean.Inputs.LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    VpcUuid string

    The ID of the VPC where the load balancer will be located.

    ForwardingRules []LoadBalancerForwardingRuleArgs

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    Region string | Region

    The region to start in

    Algorithm string | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    DisableLetsEncryptDnsRecords bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    DropletIds []int

    A list of the IDs of each droplet to be attached to the Load Balancer.

    DropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    EnableBackendKeepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    EnableProxyProtocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    Firewall LoadBalancerFirewallArgs

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    Healthcheck LoadBalancerHealthcheckArgs

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    HttpIdleTimeoutSeconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    Name string

    The Load Balancer name

    ProjectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    RedirectHttpToHttps bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    Size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    SizeUnit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    StickySessions LoadBalancerStickySessionsArgs

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    VpcUuid string

    The ID of the VPC where the load balancer will be located.

    forwardingRules List<LoadBalancerForwardingRule>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    region String | Region

    The region to start in

    algorithm String | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords Boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds List<Integer>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag String

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive Boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol Boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    healthcheck LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds Integer

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    name String

    The Load Balancer name

    projectId String

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps Boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    size String

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit Integer

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    stickySessions LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid String

    The ID of the VPC where the load balancer will be located.

    forwardingRules LoadBalancerForwardingRule[]

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    region string | Region

    The region to start in

    algorithm string | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds number[]

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    healthcheck LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds number

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    name string

    The Load Balancer name

    projectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit number

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    stickySessions LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid string

    The ID of the VPC where the load balancer will be located.

    forwarding_rules Sequence[LoadBalancerForwardingRuleArgs]

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    region str | Region

    The region to start in

    algorithm str | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disable_lets_encrypt_dns_records bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    droplet_ids Sequence[int]

    A list of the IDs of each droplet to be attached to the Load Balancer.

    droplet_tag str

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enable_backend_keepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enable_proxy_protocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewallArgs

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    healthcheck LoadBalancerHealthcheckArgs

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    http_idle_timeout_seconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    name str

    The Load Balancer name

    project_id str

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirect_http_to_https bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    size str

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    size_unit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    sticky_sessions LoadBalancerStickySessionsArgs

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpc_uuid str

    The ID of the VPC where the load balancer will be located.

    forwardingRules List<Property Map>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1"

    The region to start in

    algorithm String | "round_robin" | "least_connections"

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords Boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds List<Number>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag String

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive Boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol Boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall Property Map

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    healthcheck Property Map

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds Number

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    name String

    The Load Balancer name

    projectId String

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps Boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    size String

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit Number

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    stickySessions Property Map

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid String

    The ID of the VPC where the load balancer will be located.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Ip string

    The ip of the Load Balancer

    LoadBalancerUrn string

    The uniform resource name for the Load Balancer

    Status string
    Id string

    The provider-assigned unique ID for this managed resource.

    Ip string

    The ip of the Load Balancer

    LoadBalancerUrn string

    The uniform resource name for the Load Balancer

    Status string
    id String

    The provider-assigned unique ID for this managed resource.

    ip String

    The ip of the Load Balancer

    loadBalancerUrn String

    The uniform resource name for the Load Balancer

    status String
    id string

    The provider-assigned unique ID for this managed resource.

    ip string

    The ip of the Load Balancer

    loadBalancerUrn string

    The uniform resource name for the Load Balancer

    status string
    id str

    The provider-assigned unique ID for this managed resource.

    ip str

    The ip of the Load Balancer

    load_balancer_urn str

    The uniform resource name for the Load Balancer

    status str
    id String

    The provider-assigned unique ID for this managed resource.

    ip String

    The ip of the Load Balancer

    loadBalancerUrn String

    The uniform resource name for the Load Balancer

    status String

    Look up Existing LoadBalancer Resource

    Get an existing LoadBalancer 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?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            algorithm: Optional[Union[str, Algorithm]] = None,
            disable_lets_encrypt_dns_records: Optional[bool] = None,
            droplet_ids: Optional[Sequence[int]] = None,
            droplet_tag: Optional[str] = None,
            enable_backend_keepalive: Optional[bool] = None,
            enable_proxy_protocol: Optional[bool] = None,
            firewall: Optional[LoadBalancerFirewallArgs] = None,
            forwarding_rules: Optional[Sequence[LoadBalancerForwardingRuleArgs]] = None,
            healthcheck: Optional[LoadBalancerHealthcheckArgs] = None,
            http_idle_timeout_seconds: Optional[int] = None,
            ip: Optional[str] = None,
            load_balancer_urn: Optional[str] = None,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            redirect_http_to_https: Optional[bool] = None,
            region: Optional[Union[str, Region]] = None,
            size: Optional[str] = None,
            size_unit: Optional[int] = None,
            status: Optional[str] = None,
            sticky_sessions: Optional[LoadBalancerStickySessionsArgs] = None,
            vpc_uuid: Optional[str] = None) -> LoadBalancer
    func GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)
    public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? state, CustomResourceOptions? opts = null)
    public static LoadBalancer get(String name, Output<String> id, LoadBalancerState 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:
    Algorithm string | Pulumi.DigitalOcean.Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    DisableLetsEncryptDnsRecords bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    DropletIds List<int>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    DropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    EnableBackendKeepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    EnableProxyProtocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    Firewall Pulumi.DigitalOcean.Inputs.LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    ForwardingRules List<Pulumi.DigitalOcean.Inputs.LoadBalancerForwardingRule>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    Healthcheck Pulumi.DigitalOcean.Inputs.LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    HttpIdleTimeoutSeconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    Ip string

    The ip of the Load Balancer

    LoadBalancerUrn string

    The uniform resource name for the Load Balancer

    Name string

    The Load Balancer name

    ProjectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    RedirectHttpToHttps bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    Region string | Pulumi.DigitalOcean.Region

    The region to start in

    Size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    SizeUnit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    Status string
    StickySessions Pulumi.DigitalOcean.Inputs.LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    VpcUuid string

    The ID of the VPC where the load balancer will be located.

    Algorithm string | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    DisableLetsEncryptDnsRecords bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    DropletIds []int

    A list of the IDs of each droplet to be attached to the Load Balancer.

    DropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    EnableBackendKeepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    EnableProxyProtocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    Firewall LoadBalancerFirewallArgs

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    ForwardingRules []LoadBalancerForwardingRuleArgs

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    Healthcheck LoadBalancerHealthcheckArgs

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    HttpIdleTimeoutSeconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    Ip string

    The ip of the Load Balancer

    LoadBalancerUrn string

    The uniform resource name for the Load Balancer

    Name string

    The Load Balancer name

    ProjectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    RedirectHttpToHttps bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    Region string | Region

    The region to start in

    Size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    SizeUnit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    Status string
    StickySessions LoadBalancerStickySessionsArgs

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    VpcUuid string

    The ID of the VPC where the load balancer will be located.

    algorithm String | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords Boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds List<Integer>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag String

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive Boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol Boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    forwardingRules List<LoadBalancerForwardingRule>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    healthcheck LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds Integer

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    ip String

    The ip of the Load Balancer

    loadBalancerUrn String

    The uniform resource name for the Load Balancer

    name String

    The Load Balancer name

    projectId String

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps Boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    region String | Region

    The region to start in

    size String

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit Integer

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    status String
    stickySessions LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid String

    The ID of the VPC where the load balancer will be located.

    algorithm string | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds number[]

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag string

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewall

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    forwardingRules LoadBalancerForwardingRule[]

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    healthcheck LoadBalancerHealthcheck

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds number

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    ip string

    The ip of the Load Balancer

    loadBalancerUrn string

    The uniform resource name for the Load Balancer

    name string

    The Load Balancer name

    projectId string

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    region string | Region

    The region to start in

    size string

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit number

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    status string
    stickySessions LoadBalancerStickySessions

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid string

    The ID of the VPC where the load balancer will be located.

    algorithm str | Algorithm

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disable_lets_encrypt_dns_records bool

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    droplet_ids Sequence[int]

    A list of the IDs of each droplet to be attached to the Load Balancer.

    droplet_tag str

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enable_backend_keepalive bool

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enable_proxy_protocol bool

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall LoadBalancerFirewallArgs

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    forwarding_rules Sequence[LoadBalancerForwardingRuleArgs]

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    healthcheck LoadBalancerHealthcheckArgs

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    http_idle_timeout_seconds int

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    ip str

    The ip of the Load Balancer

    load_balancer_urn str

    The uniform resource name for the Load Balancer

    name str

    The Load Balancer name

    project_id str

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirect_http_to_https bool

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    region str | Region

    The region to start in

    size str

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    size_unit int

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    status str
    sticky_sessions LoadBalancerStickySessionsArgs

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpc_uuid str

    The ID of the VPC where the load balancer will be located.

    algorithm String | "round_robin" | "least_connections"

    The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either round_robin or least_connections. The default value is round_robin.

    disableLetsEncryptDnsRecords Boolean

    A boolean value indicating whether to disable automatic DNS record creation for Let's Encrypt certificates that are added to the load balancer. Default value is false.

    dropletIds List<Number>

    A list of the IDs of each droplet to be attached to the Load Balancer.

    dropletTag String

    The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.

    enableBackendKeepalive Boolean

    A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is false.

    enableProxyProtocol Boolean

    A boolean value indicating whether PROXY Protocol should be used to pass information from connecting client requests to the backend service. Default value is false.

    firewall Property Map

    A block containing rules for allowing/denying traffic to the Load Balancer. The firewall block is documented below. Only 1 firewall is allowed.

    forwardingRules List<Property Map>

    A list of forwarding_rule to be assigned to the Load Balancer. The forwarding_rule block is documented below.

    healthcheck Property Map

    A healthcheck block to be assigned to the Load Balancer. The healthcheck block is documented below. Only 1 healthcheck is allowed.

    httpIdleTimeoutSeconds Number

    Specifies the idle timeout for HTTPS connections on the load balancer in seconds.

    ip String

    The ip of the Load Balancer

    loadBalancerUrn String

    The uniform resource name for the Load Balancer

    name String

    The Load Balancer name

    projectId String

    The ID of the project that the load balancer is associated with. If no ID is provided at creation, the load balancer associates with the user's default project.

    redirectHttpToHttps Boolean

    A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.

    region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1"

    The region to start in

    size String

    The size of the Load Balancer. It must be either lb-small, lb-medium, or lb-large. Defaults to lb-small. Only one of size or size_unit may be provided.

    sizeUnit Number

    The size of the Load Balancer. It must be in the range (1, 100). Defaults to 1. Only one of size or size_unit may be provided.

    status String
    stickySessions Property Map

    A sticky_sessions block to be assigned to the Load Balancer. The sticky_sessions block is documented below. Only 1 sticky_sessions block is allowed.

    vpcUuid String

    The ID of the VPC where the load balancer will be located.

    Supporting Types

    Algorithm, AlgorithmArgs

    RoundRobin
    round_robin
    LeastConnections
    least_connections
    AlgorithmRoundRobin
    round_robin
    AlgorithmLeastConnections
    least_connections
    RoundRobin
    round_robin
    LeastConnections
    least_connections
    RoundRobin
    round_robin
    LeastConnections
    least_connections
    ROUND_ROBIN
    round_robin
    LEAST_CONNECTIONS
    least_connections
    "round_robin"
    round_robin
    "least_connections"
    least_connections

    LoadBalancerFirewall, LoadBalancerFirewallArgs

    Allows List<string>

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    Denies List<string>

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    Allows []string

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    Denies []string

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    allows List<String>

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    denies List<String>

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    allows string[]

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    denies string[]

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    allows Sequence[str]

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    denies Sequence[str]

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    allows List<String>

    A list of strings describing allow rules. Must be colon delimited strings of the form {type}:{source}

    • Ex. deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"] or allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
    denies List<String>

    A list of strings describing deny rules. Must be colon delimited strings of the form {type}:{source}

    LoadBalancerForwardingRule, LoadBalancerForwardingRuleArgs

    EntryPort int

    An integer representing the port on which the Load Balancer instance will listen.

    EntryProtocol string

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    TargetPort int

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    TargetProtocol string

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    CertificateId string

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    CertificateName string

    The unique name of the TLS certificate to be used for SSL termination.

    TlsPassthrough bool

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    EntryPort int

    An integer representing the port on which the Load Balancer instance will listen.

    EntryProtocol string

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    TargetPort int

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    TargetProtocol string

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    CertificateId string

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    CertificateName string

    The unique name of the TLS certificate to be used for SSL termination.

    TlsPassthrough bool

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    entryPort Integer

    An integer representing the port on which the Load Balancer instance will listen.

    entryProtocol String

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    targetPort Integer

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    targetProtocol String

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    certificateId String

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    certificateName String

    The unique name of the TLS certificate to be used for SSL termination.

    tlsPassthrough Boolean

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    entryPort number

    An integer representing the port on which the Load Balancer instance will listen.

    entryProtocol string

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    targetPort number

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    targetProtocol string

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    certificateId string

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    certificateName string

    The unique name of the TLS certificate to be used for SSL termination.

    tlsPassthrough boolean

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    entry_port int

    An integer representing the port on which the Load Balancer instance will listen.

    entry_protocol str

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    target_port int

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    target_protocol str

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    certificate_id str

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    certificate_name str

    The unique name of the TLS certificate to be used for SSL termination.

    tls_passthrough bool

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    entryPort Number

    An integer representing the port on which the Load Balancer instance will listen.

    entryProtocol String

    The protocol used for traffic to the Load Balancer. The possible values are: http, https, http2, http3, tcp, or udp.

    targetPort Number

    An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.

    targetProtocol String

    The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are: http, https, http2, tcp, or udp.

    certificateId String

    Deprecated The ID of the TLS certificate to be used for SSL termination.

    Deprecated:

    Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.

    certificateName String

    The unique name of the TLS certificate to be used for SSL termination.

    tlsPassthrough Boolean

    A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is false.

    LoadBalancerHealthcheck, LoadBalancerHealthcheckArgs

    Port int

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    Protocol string

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    CheckIntervalSeconds int

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    HealthyThreshold int

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    Path string

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    ResponseTimeoutSeconds int

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    UnhealthyThreshold int

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    Port int

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    Protocol string

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    CheckIntervalSeconds int

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    HealthyThreshold int

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    Path string

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    ResponseTimeoutSeconds int

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    UnhealthyThreshold int

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    port Integer

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    protocol String

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    checkIntervalSeconds Integer

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    healthyThreshold Integer

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    path String

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    responseTimeoutSeconds Integer

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    unhealthyThreshold Integer

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    port number

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    protocol string

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    checkIntervalSeconds number

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    healthyThreshold number

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    path string

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    responseTimeoutSeconds number

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    unhealthyThreshold number

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    port int

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    protocol str

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    check_interval_seconds int

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    healthy_threshold int

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    path str

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    response_timeout_seconds int

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    unhealthy_threshold int

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    port Number

    An integer representing the port on the backend Droplets on which the health check will attempt a connection.

    protocol String

    The protocol used for health checks sent to the backend Droplets. The possible values are http, https or tcp.

    checkIntervalSeconds Number

    The number of seconds between two consecutive health checks. If not specified, the default value is 10.

    healthyThreshold Number

    The number of times a health check must pass for a backend Droplet to be marked "healthy" and be re-added to the pool. If not specified, the default value is 5.

    path String

    The path on the backend Droplets to which the Load Balancer instance will send a request.

    responseTimeoutSeconds Number

    The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed. If not specified, the default value is 5.

    unhealthyThreshold Number

    The number of times a health check must fail for a backend Droplet to be marked "unhealthy" and be removed from the pool. If not specified, the default value is 3.

    LoadBalancerStickySessions, LoadBalancerStickySessionsArgs

    CookieName string

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    CookieTtlSeconds int

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    Type string

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    CookieName string

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    CookieTtlSeconds int

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    Type string

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    cookieName String

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    cookieTtlSeconds Integer

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    type String

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    cookieName string

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    cookieTtlSeconds number

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    type string

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    cookie_name str

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    cookie_ttl_seconds int

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    type str

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    cookieName String

    The name to be used for the cookie sent to the client. This attribute is required when using cookies for the sticky sessions type.

    cookieTtlSeconds Number

    The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using cookies for the sticky sessions type.

    type String

    An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are cookies or none. If not specified, the default value is none.

    Region, RegionArgs

    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    RegionNYC1
    nyc1
    RegionNYC2
    nyc2
    RegionNYC3
    nyc3
    RegionSGP1
    sgp1
    RegionLON1
    lon1
    RegionAMS2
    ams2
    RegionAMS3
    ams3
    RegionFRA1
    fra1
    RegionTOR1
    tor1
    RegionSFO1
    sfo1
    RegionSFO2
    sfo2
    RegionSFO3
    sfo3
    RegionBLR1
    blr1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    NYC1
    nyc1
    NYC2
    nyc2
    NYC3
    nyc3
    SGP1
    sgp1
    LON1
    lon1
    AMS2
    ams2
    AMS3
    ams3
    FRA1
    fra1
    TOR1
    tor1
    SFO1
    sfo1
    SFO2
    sfo2
    SFO3
    sfo3
    BLR1
    blr1
    "nyc1"
    nyc1
    "nyc2"
    nyc2
    "nyc3"
    nyc3
    "sgp1"
    sgp1
    "lon1"
    lon1
    "ams2"
    ams2
    "ams3"
    ams3
    "fra1"
    fra1
    "tor1"
    tor1
    "sfo1"
    sfo1
    "sfo2"
    sfo2
    "sfo3"
    sfo3
    "blr1"
    blr1

    Import

    Load Balancers can be imported using the id, e.g.

     $ pulumi import digitalocean:index/loadBalancer:LoadBalancer myloadbalancer 4de7ac8b-495b-4884-9a69-1050c6793cd6
    

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the digitalocean Terraform Provider.

    digitalocean logo
    DigitalOcean v4.22.0 published on Friday, Sep 22, 2023 by Pulumi