DigitalOcean Create

DigitalOcean Create

Certified

Create a DigitalOcean load balancer

Creates a new load balancer with at least one forwarding rule, optionally attached to a set of droplets.

yaml
type: io.kestra.plugin.digitalocean.loadbalancer.Create

Create a load balancer forwarding HTTP traffic to a set of droplets

yaml
id: digitalocean_create_load_balancer
namespace: company.team

tasks:
  - id: create_load_balancer
    type: io.kestra.plugin.digitalocean.loadbalancer.Create
    apiToken: "{{ secret('DIGITALOCEAN_TOKEN') }}"
    name: "web-lb"
    region: "nyc3"
    forwardingRules:
      - entryProtocol: "http"
        entryPort: 80
        targetProtocol: "http"
        targetPort: 80
    dropletIds:
      - 3164444
      - 3164445
Properties

DigitalOcean API token

Personal access token used to authenticate against the DigitalOcean API v2, sent as Authorization: Bearer <token>. Create one (prefixed dop_v1_) in the DigitalOcean control panel under API > Tokens, and store it as a Kestra secret.

Forwarding rules

At least one forwarding rule, each with entryProtocol, entryPort, targetProtocol, targetPort, and optional certificateId and tlsPassthrough.

Definitions
entryPort*Requiredinteger

Entry port

Port accepted on the load balancer's public-facing side.

entryProtocol*Requiredstring

Entry protocol

Protocol accepted on the load balancer's public-facing side, e.g. http, https, tcp, or udp.

targetPort*Requiredinteger

Target port

Port used to reach the backend droplets.

targetProtocol*Requiredstring

Target protocol

Protocol used to reach the backend droplets, e.g. http, https, tcp, or udp.

certificateIdstring

Certificate ID

UUID of the DigitalOcean-managed or custom certificate used for HTTPS/TLS termination on this rule.

tlsPassthroughboolean

TLS passthrough

Whether encrypted traffic is passed through to the backend without being decrypted by the load balancer.

Load balancer name

Human-readable name for the load balancer, must be unique on the account.

Region

Datacenter region slug to create the load balancer in, e.g. nyc3, ams3, sgp1.

Defaulthttps://api.digitalocean.com

DigitalOcean API base URL

Base endpoint for all DigitalOcean API calls. Defaults to https://api.digitalocean.com.

SubTypeinteger

Droplet IDs

Numeric IDs of the droplets to attach to the load balancer.

HTTP client options

Optional HTTP configuration (timeouts, proxy, SSL) applied to every DigitalOcean API call.

Definitions
allowFailedbooleanstring
Defaultfalse

If true, allow a failed response code (response code >= 400)

allowedResponseCodesarray
SubTypeinteger

List of response code allowed for this request

auth

The authentication to use.

type*Requiredobject
passwordstring

The password for HTTP basic authentication.

usernamestring

The username for HTTP basic authentication.

type*Requiredobject
tokenstring

The token for bearer token authentication.

type*Requiredobject
passwordstring

The password for HTTP Digest authentication.

usernamestring

The username for HTTP Digest authentication.

basicAuthPasswordDeprecatedstring

The password for HTTP basic authentication. Deprecated, use auth property with a BasicAuthConfiguration instance instead.

basicAuthUserDeprecatedstring

The username for HTTP basic authentication. Deprecated, use auth property with a BasicAuthConfiguration instance instead.

connectTimeoutDeprecatedstring
Formatduration

The time allowed to establish a connection to the server before failing.

connectionPoolIdleTimeoutDeprecatedstring
Formatduration

The time an idle connection can remain in the client's connection pool before being closed.

defaultCharsetstring
DefaultUTF-8

The default charset for the request.

enabledTcpExtendedKeepAlivebooleanstring
Defaulttrue

Whether to enable TCP Keep-Alive extended socket options (TCP_KEEPIDLE, TCP_KEEPINTERVAL, TCP_KEEPCOUNT).

Set to false when running on Windows workers, as these extended socket options are not supported by the Windows JDK and will cause connection failures.

followRedirectsbooleanstring
Defaulttrue

Whether redirects should be followed automatically.

logLevelDeprecatedstring
Possible Values
ALLTRACEDEBUGINFOWARNERROROFFNOT_SPECIFIED

The log level for the HTTP client.

logsarray
SubTypestring
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY

The enabled log.

maxContentLengthDeprecatedinteger

The maximum content length of the response.

proxy

The proxy configuration.

addressstring

The address of the proxy server.

passwordstring

The password for proxy authentication.

portintegerstring

The port of the proxy server.

typestring
DefaultDIRECT
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

usernamestring

The username for proxy authentication.

proxyAddressDeprecatedstring

The address of the proxy server.

proxyPasswordDeprecatedstring

The password for proxy authentication.

proxyPortDeprecatedinteger

The port of the proxy server.

proxyTypeDeprecatedstring
Possible Values
DIRECTHTTPSOCKS

The type of proxy to use.

proxyUsernameDeprecatedstring

The username for proxy authentication.

readIdleTimeoutDeprecatedstring
Formatduration

The time allowed for a read connection to remain idle before closing it.

readTimeoutDeprecatedstring
Formatduration

The maximum time allowed for reading data from the server before failing.

ssl

The SSL request options

insecureTrustAllCertificatesbooleanstring

Whether to disable checking of the remote SSL certificate.

Only applies if no trust store is configured. Note: This makes the SSL connection insecure and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.

timeout

The timeout configuration.

connectTimeoutstring

The time allowed to establish a connection to the server before failing.

readIdleTimeoutstring
DefaultPT5M

The time allowed for a read connection to remain idle before closing it.

Reference (ref) of the pluginDefaults to apply to this task.

Load balancer ID

UUID assigned by DigitalOcean.

Public IP address

Load balancer name

Region slug

Datacenter region the load balancer runs in, e.g. nyc3.

Status

One of new, active, or errored.