@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
159 lines • 9.09 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoadbalancerBackend = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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
* ```
*/
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, id, state, opts) {
return new LoadbalancerBackend(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === LoadbalancerBackend.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["failoverHost"] = state ? state.failoverHost : undefined;
resourceInputs["forwardPort"] = state ? state.forwardPort : undefined;
resourceInputs["forwardPortAlgorithm"] = state ? state.forwardPortAlgorithm : undefined;
resourceInputs["forwardProtocol"] = state ? state.forwardProtocol : undefined;
resourceInputs["healthCheckDelay"] = state ? state.healthCheckDelay : undefined;
resourceInputs["healthCheckHttp"] = state ? state.healthCheckHttp : undefined;
resourceInputs["healthCheckHttps"] = state ? state.healthCheckHttps : undefined;
resourceInputs["healthCheckMaxRetries"] = state ? state.healthCheckMaxRetries : undefined;
resourceInputs["healthCheckPort"] = state ? state.healthCheckPort : undefined;
resourceInputs["healthCheckSendProxy"] = state ? state.healthCheckSendProxy : undefined;
resourceInputs["healthCheckTcp"] = state ? state.healthCheckTcp : undefined;
resourceInputs["healthCheckTimeout"] = state ? state.healthCheckTimeout : undefined;
resourceInputs["healthCheckTransientDelay"] = state ? state.healthCheckTransientDelay : undefined;
resourceInputs["ignoreSslServerVerify"] = state ? state.ignoreSslServerVerify : undefined;
resourceInputs["lbId"] = state ? state.lbId : undefined;
resourceInputs["maxConnections"] = state ? state.maxConnections : undefined;
resourceInputs["maxRetries"] = state ? state.maxRetries : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["onMarkedDownAction"] = state ? state.onMarkedDownAction : undefined;
resourceInputs["proxyProtocol"] = state ? state.proxyProtocol : undefined;
resourceInputs["redispatchAttemptCount"] = state ? state.redispatchAttemptCount : undefined;
resourceInputs["sendProxyV2"] = state ? state.sendProxyV2 : undefined;
resourceInputs["serverIps"] = state ? state.serverIps : undefined;
resourceInputs["sslBridging"] = state ? state.sslBridging : undefined;
resourceInputs["stickySessions"] = state ? state.stickySessions : undefined;
resourceInputs["stickySessionsCookieName"] = state ? state.stickySessionsCookieName : undefined;
resourceInputs["timeoutConnect"] = state ? state.timeoutConnect : undefined;
resourceInputs["timeoutQueue"] = state ? state.timeoutQueue : undefined;
resourceInputs["timeoutServer"] = state ? state.timeoutServer : undefined;
resourceInputs["timeoutTunnel"] = state ? state.timeoutTunnel : undefined;
}
else {
const args = argsOrState;
if ((!args || args.forwardPort === undefined) && !opts.urn) {
throw new Error("Missing required property 'forwardPort'");
}
if ((!args || args.forwardProtocol === undefined) && !opts.urn) {
throw new Error("Missing required property 'forwardProtocol'");
}
if ((!args || args.lbId === undefined) && !opts.urn) {
throw new Error("Missing required property 'lbId'");
}
resourceInputs["failoverHost"] = args ? args.failoverHost : undefined;
resourceInputs["forwardPort"] = args ? args.forwardPort : undefined;
resourceInputs["forwardPortAlgorithm"] = args ? args.forwardPortAlgorithm : undefined;
resourceInputs["forwardProtocol"] = args ? args.forwardProtocol : undefined;
resourceInputs["healthCheckDelay"] = args ? args.healthCheckDelay : undefined;
resourceInputs["healthCheckHttp"] = args ? args.healthCheckHttp : undefined;
resourceInputs["healthCheckHttps"] = args ? args.healthCheckHttps : undefined;
resourceInputs["healthCheckMaxRetries"] = args ? args.healthCheckMaxRetries : undefined;
resourceInputs["healthCheckPort"] = args ? args.healthCheckPort : undefined;
resourceInputs["healthCheckSendProxy"] = args ? args.healthCheckSendProxy : undefined;
resourceInputs["healthCheckTcp"] = args ? args.healthCheckTcp : undefined;
resourceInputs["healthCheckTimeout"] = args ? args.healthCheckTimeout : undefined;
resourceInputs["healthCheckTransientDelay"] = args ? args.healthCheckTransientDelay : undefined;
resourceInputs["ignoreSslServerVerify"] = args ? args.ignoreSslServerVerify : undefined;
resourceInputs["lbId"] = args ? args.lbId : undefined;
resourceInputs["maxConnections"] = args ? args.maxConnections : undefined;
resourceInputs["maxRetries"] = args ? args.maxRetries : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["onMarkedDownAction"] = args ? args.onMarkedDownAction : undefined;
resourceInputs["proxyProtocol"] = args ? args.proxyProtocol : undefined;
resourceInputs["redispatchAttemptCount"] = args ? args.redispatchAttemptCount : undefined;
resourceInputs["sendProxyV2"] = args ? args.sendProxyV2 : undefined;
resourceInputs["serverIps"] = args ? args.serverIps : undefined;
resourceInputs["sslBridging"] = args ? args.sslBridging : undefined;
resourceInputs["stickySessions"] = args ? args.stickySessions : undefined;
resourceInputs["stickySessionsCookieName"] = args ? args.stickySessionsCookieName : undefined;
resourceInputs["timeoutConnect"] = args ? args.timeoutConnect : undefined;
resourceInputs["timeoutQueue"] = args ? args.timeoutQueue : undefined;
resourceInputs["timeoutServer"] = args ? args.timeoutServer : undefined;
resourceInputs["timeoutTunnel"] = args ? args.timeoutTunnel : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LoadbalancerBackend.__pulumiType, name, resourceInputs, opts);
}
}
exports.LoadbalancerBackend = LoadbalancerBackend;
/** @internal */
LoadbalancerBackend.__pulumiType = 'scaleway:index/loadbalancerBackend:LoadbalancerBackend';
//# sourceMappingURL=loadbalancerBackend.js.map