digitalocean.LoadBalancer
Explore with Pulumi AI
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:
- Forwarding
Rules List<Pulumi.Digital Ocean. Inputs. Load Balancer Forwarding Rule> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- Region
string | Pulumi.
Digital Ocean. Region The region to start in
- Algorithm
string | Pulumi.
Digital Ocean. Algorithm The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either
round_robin
orleast_connections
. The default value isround_robin
.- Disable
Lets boolEncrypt Dns Records 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 List<int> A list of the IDs of each droplet to be attached to the Load Balancer.
- Droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- Enable
Backend boolKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- Enable
Proxy boolProtocol 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.
Digital Ocean. Inputs. Load Balancer Firewall 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.
Digital Ocean. Inputs. Load Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- Http
Idle intTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- Name string
The Load Balancer name
- Project
Id 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.
- Redirect
Http boolTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- Sticky
Sessions Pulumi.Digital Ocean. Inputs. Load Balancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- Vpc
Uuid string The ID of the VPC where the load balancer will be located.
- Forwarding
Rules []LoadBalancer Forwarding Rule Args A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_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
orleast_connections
. The default value isround_robin
.- Disable
Lets boolEncrypt Dns Records 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 []int A list of the IDs of each droplet to be attached to the Load Balancer.
- Droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- Enable
Backend boolKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- Enable
Proxy boolProtocol 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
Load
Balancer Firewall Args A block containing rules for allowing/denying traffic to the Load Balancer. The
firewall
block is documented below. Only 1 firewall is allowed.- Healthcheck
Load
Balancer Healthcheck Args A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- Http
Idle intTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- Name string
The Load Balancer name
- Project
Id 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.
- Redirect
Http boolTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- Sticky
Sessions LoadBalancer Sticky Sessions Args A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- Vpc
Uuid string The ID of the VPC where the load balancer will be located.
- forwarding
Rules List<LoadBalancer Forwarding Rule> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_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
orleast_connections
. The default value isround_robin
.- disable
Lets BooleanEncrypt Dns Records 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 List<Integer> A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag String The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend BooleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy BooleanProtocol 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
Load
Balancer Firewall A block containing rules for allowing/denying traffic to the Load Balancer. The
firewall
block is documented below. Only 1 firewall is allowed.- healthcheck
Load
Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle IntegerTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- name String
The Load Balancer name
- project
Id 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.
- redirect
Http BooleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit Integer The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- sticky
Sessions LoadBalancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid String The ID of the VPC where the load balancer will be located.
- forwarding
Rules LoadBalancer Forwarding Rule[] A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_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
orleast_connections
. The default value isround_robin
.- disable
Lets booleanEncrypt Dns Records 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 number[] A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend booleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy booleanProtocol 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
Load
Balancer Firewall A block containing rules for allowing/denying traffic to the Load Balancer. The
firewall
block is documented below. Only 1 firewall is allowed.- healthcheck
Load
Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle numberTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- name string
The Load Balancer name
- project
Id 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.
- redirect
Http booleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit number The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- sticky
Sessions LoadBalancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid string The ID of the VPC where the load balancer will be located.
- forwarding_
rules Sequence[LoadBalancer Forwarding Rule Args] A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_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
orleast_connections
. The default value isround_robin
.- disable_
lets_ boolencrypt_ dns_ records 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_ boolkeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable_
proxy_ boolprotocol 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
Load
Balancer Firewall Args A block containing rules for allowing/denying traffic to the Load Balancer. The
firewall
block is documented below. Only 1 firewall is allowed.- healthcheck
Load
Balancer Healthcheck Args A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http_
idle_ inttimeout_ seconds 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_ boolto_ https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- sticky_
sessions LoadBalancer Sticky Sessions Args A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_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.
- forwarding
Rules List<Property Map> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_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
orleast_connections
. The default value isround_robin
.- disable
Lets BooleanEncrypt Dns Records 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 List<Number> A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag String The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend BooleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy BooleanProtocol 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. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle NumberTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- name String
The Load Balancer name
- project
Id 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.
- redirect
Http BooleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit Number The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- sticky
Sessions Property Map A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid 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
- Load
Balancer stringUrn 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
- Load
Balancer stringUrn 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
- load
Balancer StringUrn 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
- load
Balancer stringUrn 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_ strurn 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
- load
Balancer StringUrn 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.
- Algorithm
string | Pulumi.
Digital Ocean. Algorithm The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either
round_robin
orleast_connections
. The default value isround_robin
.- Disable
Lets boolEncrypt Dns Records 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 List<int> A list of the IDs of each droplet to be attached to the Load Balancer.
- Droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- Enable
Backend boolKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- Enable
Proxy boolProtocol 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.
Digital Ocean. Inputs. Load Balancer Firewall 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 List<Pulumi.Digital Ocean. Inputs. Load Balancer Forwarding Rule> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- Healthcheck
Pulumi.
Digital Ocean. Inputs. Load Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- Http
Idle intTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- Ip string
The ip of the Load Balancer
- Load
Balancer stringUrn The uniform resource name for the Load Balancer
- Name string
The Load Balancer name
- Project
Id 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.
- Redirect
Http boolTo Https 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.
Digital Ocean. Region The region to start in
- Size string
The size of the Load Balancer. It must be either
lb-small
,lb-medium
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- Status string
- Sticky
Sessions Pulumi.Digital Ocean. Inputs. Load Balancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- Vpc
Uuid 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
orleast_connections
. The default value isround_robin
.- Disable
Lets boolEncrypt Dns Records 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 []int A list of the IDs of each droplet to be attached to the Load Balancer.
- Droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- Enable
Backend boolKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- Enable
Proxy boolProtocol 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
Load
Balancer Firewall Args 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 []LoadBalancer Forwarding Rule Args A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- Healthcheck
Load
Balancer Healthcheck Args A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- Http
Idle intTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- Ip string
The ip of the Load Balancer
- Load
Balancer stringUrn The uniform resource name for the Load Balancer
- Name string
The Load Balancer name
- Project
Id 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.
- Redirect
Http boolTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- Status string
- Sticky
Sessions LoadBalancer Sticky Sessions Args A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- Vpc
Uuid 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
orleast_connections
. The default value isround_robin
.- disable
Lets BooleanEncrypt Dns Records 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 List<Integer> A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag String The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend BooleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy BooleanProtocol 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
Load
Balancer Firewall 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 List<LoadBalancer Forwarding Rule> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- healthcheck
Load
Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle IntegerTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- ip String
The ip of the Load Balancer
- load
Balancer StringUrn The uniform resource name for the Load Balancer
- name String
The Load Balancer name
- project
Id 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.
- redirect
Http BooleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit Integer The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- status String
- sticky
Sessions LoadBalancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid 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
orleast_connections
. The default value isround_robin
.- disable
Lets booleanEncrypt Dns Records 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 number[] A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag string The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend booleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy booleanProtocol 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
Load
Balancer Firewall 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 LoadBalancer Forwarding Rule[] A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- healthcheck
Load
Balancer Healthcheck A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle numberTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- ip string
The ip of the Load Balancer
- load
Balancer stringUrn The uniform resource name for the Load Balancer
- name string
The Load Balancer name
- project
Id 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.
- redirect
Http booleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit number The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- status string
- sticky
Sessions LoadBalancer Sticky Sessions A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid 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
orleast_connections
. The default value isround_robin
.- disable_
lets_ boolencrypt_ dns_ records 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_ boolkeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable_
proxy_ boolprotocol 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
Load
Balancer Firewall Args 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[LoadBalancer Forwarding Rule Args] A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- healthcheck
Load
Balancer Healthcheck Args A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http_
idle_ inttimeout_ seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- ip str
The ip of the Load Balancer
- load_
balancer_ strurn 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_ boolto_ https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_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 ofsize
orsize_unit
may be provided.- status str
- sticky_
sessions LoadBalancer Sticky Sessions Args A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_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
orleast_connections
. The default value isround_robin
.- disable
Lets BooleanEncrypt Dns Records 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 List<Number> A list of the IDs of each droplet to be attached to the Load Balancer.
- droplet
Tag String The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
- enable
Backend BooleanKeepalive A boolean value indicating whether HTTP keepalive connections are maintained to target Droplets. Default value is
false
.- enable
Proxy BooleanProtocol 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.- forwarding
Rules List<Property Map> A list of
forwarding_rule
to be assigned to the Load Balancer. Theforwarding_rule
block is documented below.- healthcheck Property Map
A
healthcheck
block to be assigned to the Load Balancer. Thehealthcheck
block is documented below. Only 1 healthcheck is allowed.- http
Idle NumberTimeout Seconds Specifies the idle timeout for HTTPS connections on the load balancer in seconds.
- ip String
The ip of the Load Balancer
- load
Balancer StringUrn The uniform resource name for the Load Balancer
- name String
The Load Balancer name
- project
Id 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.
- redirect
Http BooleanTo Https 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
, orlb-large
. Defaults tolb-small
. Only one ofsize
orsize_unit
may be provided.- size
Unit Number The size of the Load Balancer. It must be in the range (1, 100). Defaults to
1
. Only one ofsize
orsize_unit
may be provided.- status String
- sticky
Sessions Property Map A
sticky_sessions
block to be assigned to the Load Balancer. Thesticky_sessions
block is documented below. Only 1 sticky_sessions block is allowed.- vpc
Uuid String The ID of the VPC where the load balancer will be located.
Supporting Types
Algorithm, AlgorithmArgs
- Round
Robin - round_robin
- Least
Connections - least_connections
- Algorithm
Round Robin - round_robin
- Algorithm
Least Connections - least_connections
- Round
Robin - round_robin
- Least
Connections - least_connections
- Round
Robin - round_robin
- Least
Connections - 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- 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"]
orallow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]
- Ex.
- denies List<String>
A list of strings describing deny rules. Must be colon delimited strings of the form
{type}:{source}
LoadBalancerForwardingRule, LoadBalancerForwardingRuleArgs
- Entry
Port int An integer representing the port on which the Load Balancer instance will listen.
- Entry
Protocol string The protocol used for traffic to the Load Balancer. The possible values are:
http
,https
,http2
,http3
,tcp
, orudp
.- Target
Port int An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.
- Target
Protocol string The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are:
http
,https
,http2
,tcp
, orudp
.- Certificate
Id string Deprecated The ID of the TLS certificate to be used for SSL termination.
Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.
- Certificate
Name string 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
.
- Entry
Port int An integer representing the port on which the Load Balancer instance will listen.
- Entry
Protocol string The protocol used for traffic to the Load Balancer. The possible values are:
http
,https
,http2
,http3
,tcp
, orudp
.- Target
Port int An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.
- Target
Protocol string The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are:
http
,https
,http2
,tcp
, orudp
.- Certificate
Id string Deprecated The ID of the TLS certificate to be used for SSL termination.
Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.
- Certificate
Name string 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
.
- entry
Port Integer An integer representing the port on which the Load Balancer instance will listen.
- entry
Protocol String The protocol used for traffic to the Load Balancer. The possible values are:
http
,https
,http2
,http3
,tcp
, orudp
.- target
Port Integer An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.
- target
Protocol String The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are:
http
,https
,http2
,tcp
, orudp
.- certificate
Id String Deprecated The ID of the TLS certificate to be used for SSL termination.
Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.
- certificate
Name String The unique name of the TLS certificate to be used for SSL termination.
- tls
Passthrough Boolean A boolean value indicating whether SSL encrypted traffic will be passed through to the backend Droplets. The default value is
false
.
- entry
Port number An integer representing the port on which the Load Balancer instance will listen.
- entry
Protocol string The protocol used for traffic to the Load Balancer. The possible values are:
http
,https
,http2
,http3
,tcp
, orudp
.- target
Port number An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.
- target
Protocol string The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are:
http
,https
,http2
,tcp
, orudp
.- certificate
Id string Deprecated The ID of the TLS certificate to be used for SSL termination.
Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.
- certificate
Name string The unique name of the TLS certificate to be used for SSL termination.
- tls
Passthrough 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
, orudp
.- 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
, orudp
.- certificate_
id str Deprecated The ID of the TLS certificate to be used for SSL termination.
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
.
- entry
Port Number An integer representing the port on which the Load Balancer instance will listen.
- entry
Protocol String The protocol used for traffic to the Load Balancer. The possible values are:
http
,https
,http2
,http3
,tcp
, orudp
.- target
Port Number An integer representing the port on the backend Droplets to which the Load Balancer will send traffic.
- target
Protocol String The protocol used for traffic from the Load Balancer to the backend Droplets. The possible values are:
http
,https
,http2
,tcp
, orudp
.- certificate
Id String Deprecated The ID of the TLS certificate to be used for SSL termination.
Certificate IDs may change, for example when a Let's Encrypt certificate is auto-renewed. Please specify 'certificate_name' instead.
- certificate
Name String The unique name of the TLS certificate to be used for SSL termination.
- tls
Passthrough 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
ortcp
.- Check
Interval intSeconds 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 string
The path on the backend Droplets to which the Load Balancer instance will send a request.
- Response
Timeout intSeconds 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 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
ortcp
.- Check
Interval intSeconds 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 string
The path on the backend Droplets to which the Load Balancer instance will send a request.
- Response
Timeout intSeconds 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 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
ortcp
.- check
Interval IntegerSeconds The number of seconds between two consecutive health checks. If not specified, the default value is
10
.- healthy
Threshold 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.
- response
Timeout IntegerSeconds 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 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
ortcp
.- check
Interval numberSeconds The number of seconds between two consecutive health checks. If not specified, the default value is
10
.- healthy
Threshold 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.
- response
Timeout numberSeconds 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 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
ortcp
.- check_
interval_ intseconds 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_ intseconds 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
ortcp
.- check
Interval NumberSeconds The number of seconds between two consecutive health checks. If not specified, the default value is
10
.- healthy
Threshold 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.
- response
Timeout NumberSeconds 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 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
- 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.- 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
ornone
. If not specified, the default value isnone
.
- 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.- 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
ornone
. If not specified, the default value isnone
.
- 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.- 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
ornone
. If not specified, the default value isnone
.
- 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.- 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
ornone
. If not specified, the default value isnone
.
- 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.- 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
ornone
. If not specified, the default value isnone
.
- 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.- 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
ornone
. If not specified, the default value isnone
.
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
- Region
NYC1 - nyc1
- Region
NYC2 - nyc2
- Region
NYC3 - nyc3
- Region
SGP1 - sgp1
- Region
LON1 - lon1
- Region
AMS2 - ams2
- Region
AMS3 - ams3
- Region
FRA1 - fra1
- Region
TOR1 - tor1
- Region
SFO1 - sfo1
- Region
SFO2 - sfo2
- Region
SFO3 - sfo3
- Region
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
- "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.