@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
457 lines (456 loc) • 17.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates and manages Scaleway Load-Balancer Backends.
* For more information, see [the documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-backends).
*
* ## Examples
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const backend01 = new scaleway.LoadbalancerBackend("backend01", {
* lbId: scaleway_lb.lb01.id,
* forwardProtocol: "http",
* forwardPort: 80,
* });
* ```
*
* ### With HTTP Health Check
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const backend01 = new scaleway.LoadbalancerBackend("backend01", {
* lbId: scaleway_lb.lb01.id,
* forwardProtocol: "http",
* forwardPort: 80,
* healthCheckHttp: {
* uri: "www.test.com/health",
* },
* });
* ```
*
* ## Import
*
* Load-Balancer backend can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/loadbalancerBackend:LoadbalancerBackend backend01 fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class LoadbalancerBackend extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerBackend resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LoadbalancerBackendState, opts?: pulumi.CustomResourceOptions): LoadbalancerBackend;
/**
* Returns true if the given object is an instance of LoadbalancerBackend. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is LoadbalancerBackend;
/**
* Scaleway S3 bucket website to be served in case all backend servers are down.
* > **Note:** Only the host part of the Scaleway S3 bucket website is expected:
* e.g. 'failover-website.s3-website.fr-par.scw.cloud' if your bucket website URL is 'https://failover-website.s3-website.fr-par.scw.cloud/'.
*/
readonly failoverHost: pulumi.Output<string | undefined>;
/**
* User sessions will be forwarded to this port of backend servers.
*/
readonly forwardPort: pulumi.Output<number>;
/**
* Load balancing algorithm. Possible values are: `roundrobin`, `leastconn` and `first`.
*/
readonly forwardPortAlgorithm: pulumi.Output<string | undefined>;
/**
* Backend protocol. Possible values are: `tcp` or `http`.
*/
readonly forwardProtocol: pulumi.Output<string>;
/**
* Interval between two HC requests.
*/
readonly healthCheckDelay: pulumi.Output<string | undefined>;
/**
* This block enable HTTP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
readonly healthCheckHttp: pulumi.Output<outputs.LoadbalancerBackendHealthCheckHttp | undefined>;
/**
* This block enable HTTPS health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
readonly healthCheckHttps: pulumi.Output<outputs.LoadbalancerBackendHealthCheckHttps | undefined>;
/**
* Number of allowed failed HC requests before the backend server is marked down.
*/
readonly healthCheckMaxRetries: pulumi.Output<number | undefined>;
/**
* Port the HC requests will be send to.
*/
readonly healthCheckPort: pulumi.Output<number>;
/**
* Defines whether proxy protocol should be activated for the health check.
*/
readonly healthCheckSendProxy: pulumi.Output<boolean | undefined>;
/**
* This block enable TCP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
readonly healthCheckTcp: pulumi.Output<outputs.LoadbalancerBackendHealthCheckTcp>;
/**
* Timeout before we consider a HC request failed.
*/
readonly healthCheckTimeout: pulumi.Output<string | undefined>;
/**
* The time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
*/
readonly healthCheckTransientDelay: pulumi.Output<string | undefined>;
/**
* Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection.
*/
readonly ignoreSslServerVerify: pulumi.Output<boolean | undefined>;
/**
* The load-balancer ID this backend is attached to.
* > **Important:** Updates to `lbId` will recreate the backend.
*/
readonly lbId: pulumi.Output<string>;
/**
* Maximum number of connections allowed per backend server.
*/
readonly maxConnections: pulumi.Output<number | undefined>;
/**
* Number of retries when a backend server connection failed.
*/
readonly maxRetries: pulumi.Output<number | undefined>;
/**
* The name of the load-balancer backend.
*/
readonly name: pulumi.Output<string>;
/**
* Modify what occurs when a backend server is marked down. Possible values are: `none` and `shutdownSessions`.
*/
readonly onMarkedDownAction: pulumi.Output<string | undefined>;
/**
* Choose the type of PROXY protocol to enable (`none`, `v1`, `v2`, `v2Ssl`, `v2SslCn`)
*/
readonly proxyProtocol: pulumi.Output<string | undefined>;
/**
* Whether to use another backend server on each attempt.
*/
readonly redispatchAttemptCount: pulumi.Output<number | undefined>;
/**
* DEPRECATED please use `proxyProtocol` instead - (Default: `false`) Enables PROXY protocol version 2.
*
* @deprecated Please use proxy_protocol instead
*/
readonly sendProxyV2: pulumi.Output<boolean>;
/**
* List of backend server IP addresses. Addresses can be either IPv4 or IPv6.
*/
readonly serverIps: pulumi.Output<string[] | undefined>;
/**
* Enables SSL between load balancer and backend servers.
*/
readonly sslBridging: pulumi.Output<boolean | undefined>;
/**
* The type of sticky sessions. The only current possible values are: `none`, `cookie` and `table`.
*/
readonly stickySessions: pulumi.Output<string | undefined>;
/**
* Cookie name for sticky sessions. Only applicable when stickySessions is set to `cookie`.
*/
readonly stickySessionsCookieName: pulumi.Output<string | undefined>;
/**
* Maximum initial server connection establishment time. (e.g.: `1s`)
*/
readonly timeoutConnect: pulumi.Output<string | undefined>;
/**
* Maximum time for a request to be left pending in queue when `maxConnections` is reached. (e.g.: `1s`)
*/
readonly timeoutQueue: pulumi.Output<string | undefined>;
/**
* Maximum server connection inactivity time. (e.g.: `1s`)
*/
readonly timeoutServer: pulumi.Output<string | undefined>;
/**
* Maximum tunnel inactivity time. (e.g.: `1s`)
*/
readonly timeoutTunnel: pulumi.Output<string | undefined>;
/**
* Create a LoadbalancerBackend resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: LoadbalancerBackendArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering LoadbalancerBackend resources.
*/
export interface LoadbalancerBackendState {
/**
* Scaleway S3 bucket website to be served in case all backend servers are down.
* > **Note:** Only the host part of the Scaleway S3 bucket website is expected:
* e.g. 'failover-website.s3-website.fr-par.scw.cloud' if your bucket website URL is 'https://failover-website.s3-website.fr-par.scw.cloud/'.
*/
failoverHost?: pulumi.Input<string>;
/**
* User sessions will be forwarded to this port of backend servers.
*/
forwardPort?: pulumi.Input<number>;
/**
* Load balancing algorithm. Possible values are: `roundrobin`, `leastconn` and `first`.
*/
forwardPortAlgorithm?: pulumi.Input<string>;
/**
* Backend protocol. Possible values are: `tcp` or `http`.
*/
forwardProtocol?: pulumi.Input<string>;
/**
* Interval between two HC requests.
*/
healthCheckDelay?: pulumi.Input<string>;
/**
* This block enable HTTP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckHttp?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckHttp>;
/**
* This block enable HTTPS health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckHttps?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckHttps>;
/**
* Number of allowed failed HC requests before the backend server is marked down.
*/
healthCheckMaxRetries?: pulumi.Input<number>;
/**
* Port the HC requests will be send to.
*/
healthCheckPort?: pulumi.Input<number>;
/**
* Defines whether proxy protocol should be activated for the health check.
*/
healthCheckSendProxy?: pulumi.Input<boolean>;
/**
* This block enable TCP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckTcp?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckTcp>;
/**
* Timeout before we consider a HC request failed.
*/
healthCheckTimeout?: pulumi.Input<string>;
/**
* The time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
*/
healthCheckTransientDelay?: pulumi.Input<string>;
/**
* Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection.
*/
ignoreSslServerVerify?: pulumi.Input<boolean>;
/**
* The load-balancer ID this backend is attached to.
* > **Important:** Updates to `lbId` will recreate the backend.
*/
lbId?: pulumi.Input<string>;
/**
* Maximum number of connections allowed per backend server.
*/
maxConnections?: pulumi.Input<number>;
/**
* Number of retries when a backend server connection failed.
*/
maxRetries?: pulumi.Input<number>;
/**
* The name of the load-balancer backend.
*/
name?: pulumi.Input<string>;
/**
* Modify what occurs when a backend server is marked down. Possible values are: `none` and `shutdownSessions`.
*/
onMarkedDownAction?: pulumi.Input<string>;
/**
* Choose the type of PROXY protocol to enable (`none`, `v1`, `v2`, `v2Ssl`, `v2SslCn`)
*/
proxyProtocol?: pulumi.Input<string>;
/**
* Whether to use another backend server on each attempt.
*/
redispatchAttemptCount?: pulumi.Input<number>;
/**
* DEPRECATED please use `proxyProtocol` instead - (Default: `false`) Enables PROXY protocol version 2.
*
* @deprecated Please use proxy_protocol instead
*/
sendProxyV2?: pulumi.Input<boolean>;
/**
* List of backend server IP addresses. Addresses can be either IPv4 or IPv6.
*/
serverIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Enables SSL between load balancer and backend servers.
*/
sslBridging?: pulumi.Input<boolean>;
/**
* The type of sticky sessions. The only current possible values are: `none`, `cookie` and `table`.
*/
stickySessions?: pulumi.Input<string>;
/**
* Cookie name for sticky sessions. Only applicable when stickySessions is set to `cookie`.
*/
stickySessionsCookieName?: pulumi.Input<string>;
/**
* Maximum initial server connection establishment time. (e.g.: `1s`)
*/
timeoutConnect?: pulumi.Input<string>;
/**
* Maximum time for a request to be left pending in queue when `maxConnections` is reached. (e.g.: `1s`)
*/
timeoutQueue?: pulumi.Input<string>;
/**
* Maximum server connection inactivity time. (e.g.: `1s`)
*/
timeoutServer?: pulumi.Input<string>;
/**
* Maximum tunnel inactivity time. (e.g.: `1s`)
*/
timeoutTunnel?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a LoadbalancerBackend resource.
*/
export interface LoadbalancerBackendArgs {
/**
* Scaleway S3 bucket website to be served in case all backend servers are down.
* > **Note:** Only the host part of the Scaleway S3 bucket website is expected:
* e.g. 'failover-website.s3-website.fr-par.scw.cloud' if your bucket website URL is 'https://failover-website.s3-website.fr-par.scw.cloud/'.
*/
failoverHost?: pulumi.Input<string>;
/**
* User sessions will be forwarded to this port of backend servers.
*/
forwardPort: pulumi.Input<number>;
/**
* Load balancing algorithm. Possible values are: `roundrobin`, `leastconn` and `first`.
*/
forwardPortAlgorithm?: pulumi.Input<string>;
/**
* Backend protocol. Possible values are: `tcp` or `http`.
*/
forwardProtocol: pulumi.Input<string>;
/**
* Interval between two HC requests.
*/
healthCheckDelay?: pulumi.Input<string>;
/**
* This block enable HTTP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckHttp?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckHttp>;
/**
* This block enable HTTPS health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckHttps?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckHttps>;
/**
* Number of allowed failed HC requests before the backend server is marked down.
*/
healthCheckMaxRetries?: pulumi.Input<number>;
/**
* Port the HC requests will be send to.
*/
healthCheckPort?: pulumi.Input<number>;
/**
* Defines whether proxy protocol should be activated for the health check.
*/
healthCheckSendProxy?: pulumi.Input<boolean>;
/**
* This block enable TCP health check. Only one of `healthCheckTcp`, `healthCheckHttp` and `healthCheckHttps` should be specified.
*/
healthCheckTcp?: pulumi.Input<inputs.LoadbalancerBackendHealthCheckTcp>;
/**
* Timeout before we consider a HC request failed.
*/
healthCheckTimeout?: pulumi.Input<string>;
/**
* The time to wait between two consecutive health checks when a backend server is in a transient state (going UP or DOWN).
*/
healthCheckTransientDelay?: pulumi.Input<string>;
/**
* Specifies whether the Load Balancer should check the backend server’s certificate before initiating a connection.
*/
ignoreSslServerVerify?: pulumi.Input<boolean>;
/**
* The load-balancer ID this backend is attached to.
* > **Important:** Updates to `lbId` will recreate the backend.
*/
lbId: pulumi.Input<string>;
/**
* Maximum number of connections allowed per backend server.
*/
maxConnections?: pulumi.Input<number>;
/**
* Number of retries when a backend server connection failed.
*/
maxRetries?: pulumi.Input<number>;
/**
* The name of the load-balancer backend.
*/
name?: pulumi.Input<string>;
/**
* Modify what occurs when a backend server is marked down. Possible values are: `none` and `shutdownSessions`.
*/
onMarkedDownAction?: pulumi.Input<string>;
/**
* Choose the type of PROXY protocol to enable (`none`, `v1`, `v2`, `v2Ssl`, `v2SslCn`)
*/
proxyProtocol?: pulumi.Input<string>;
/**
* Whether to use another backend server on each attempt.
*/
redispatchAttemptCount?: pulumi.Input<number>;
/**
* DEPRECATED please use `proxyProtocol` instead - (Default: `false`) Enables PROXY protocol version 2.
*
* @deprecated Please use proxy_protocol instead
*/
sendProxyV2?: pulumi.Input<boolean>;
/**
* List of backend server IP addresses. Addresses can be either IPv4 or IPv6.
*/
serverIps?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Enables SSL between load balancer and backend servers.
*/
sslBridging?: pulumi.Input<boolean>;
/**
* The type of sticky sessions. The only current possible values are: `none`, `cookie` and `table`.
*/
stickySessions?: pulumi.Input<string>;
/**
* Cookie name for sticky sessions. Only applicable when stickySessions is set to `cookie`.
*/
stickySessionsCookieName?: pulumi.Input<string>;
/**
* Maximum initial server connection establishment time. (e.g.: `1s`)
*/
timeoutConnect?: pulumi.Input<string>;
/**
* Maximum time for a request to be left pending in queue when `maxConnections` is reached. (e.g.: `1s`)
*/
timeoutQueue?: pulumi.Input<string>;
/**
* Maximum server connection inactivity time. (e.g.: `1s`)
*/
timeoutServer?: pulumi.Input<string>;
/**
* Maximum tunnel inactivity time. (e.g.: `1s`)
*/
timeoutTunnel?: pulumi.Input<string>;
}