@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
230 lines • 9.28 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoadbalancerFrontend = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("./utilities"));
/**
* Creates and manages Scaleway Load Balancer frontends.
*
* For more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/reference-content/configuring-frontends/) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-frontends).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const frontend01 = new scaleway.loadbalancers.Frontend("frontend01", {
* lbId: lb01.id,
* backendId: backend01.id,
* name: "frontend01",
* inboundPort: 80,
* });
* ```
*
* ## With ACLs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const frontend01 = new scaleway.loadbalancers.Frontend("frontend01", {
* lbId: lb01.id,
* backendId: backend01.id,
* name: "frontend01",
* inboundPort: 80,
* acls: [
* {
* name: "blacklist wellknwon IPs",
* action: {
* type: "allow",
* },
* match: {
* ipSubnets: [
* "192.168.0.1",
* "192.168.0.2",
* "192.168.10.0/24",
* ],
* },
* },
* {
* action: {
* type: "deny",
* },
* match: {
* ipSubnets: ["51.51.51.51"],
* httpFilter: "regex",
* httpFilterValues: ["^foo*bar$"],
* },
* },
* {
* action: {
* type: "allow",
* },
* match: {
* httpFilter: "path_begin",
* httpFilterValues: [
* "foo",
* "bar",
* ],
* },
* },
* {
* action: {
* type: "allow",
* },
* match: {
* httpFilter: "path_begin",
* httpFilterValues: ["hi"],
* invert: true,
* },
* },
* {
* action: {
* type: "allow",
* },
* match: {
* httpFilter: "http_header_match",
* httpFilterValues: "foo",
* httpFilterOption: "bar",
* },
* },
* {
* action: {
* type: "redirect",
* redirects: [{
* type: "location",
* target: "https://example.com",
* code: 307,
* }],
* },
* match: {
* ipSubnets: ["10.0.0.10"],
* httpFilter: "path_begin",
* httpFilterValues: [
* "foo",
* "bar",
* ],
* },
* },
* ],
* });
* ```
*
* ## Import
*
* Load Balancer frontends can be imported using `{zone}/{id}`, e.g.
*
* ```sh
* $ pulumi import scaleway:index/loadbalancerFrontend:LoadbalancerFrontend frontend01 fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*
* @deprecated scaleway.index/loadbalancerfrontend.LoadbalancerFrontend has been deprecated in favor of scaleway.loadbalancers/frontend.Frontend
*/
class LoadbalancerFrontend extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerFrontend 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) {
pulumi.log.warn("LoadbalancerFrontend is deprecated: scaleway.index/loadbalancerfrontend.LoadbalancerFrontend has been deprecated in favor of scaleway.loadbalancers/frontend.Frontend");
return new LoadbalancerFrontend(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:index/loadbalancerFrontend:LoadbalancerFrontend';
/**
* Returns true if the given object is an instance of LoadbalancerFrontend. 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'] === LoadbalancerFrontend.__pulumiType;
}
/** @deprecated scaleway.index/loadbalancerfrontend.LoadbalancerFrontend has been deprecated in favor of scaleway.loadbalancers/frontend.Frontend */
constructor(name, argsOrState, opts) {
pulumi.log.warn("LoadbalancerFrontend is deprecated: scaleway.index/loadbalancerfrontend.LoadbalancerFrontend has been deprecated in favor of scaleway.loadbalancers/frontend.Frontend");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["acls"] = state?.acls;
resourceInputs["backendId"] = state?.backendId;
resourceInputs["certificateId"] = state?.certificateId;
resourceInputs["certificateIds"] = state?.certificateIds;
resourceInputs["connectionRateLimit"] = state?.connectionRateLimit;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["enableAccessLogs"] = state?.enableAccessLogs;
resourceInputs["enableHttp3"] = state?.enableHttp3;
resourceInputs["externalAcls"] = state?.externalAcls;
resourceInputs["inboundPort"] = state?.inboundPort;
resourceInputs["lbId"] = state?.lbId;
resourceInputs["name"] = state?.name;
resourceInputs["timeoutClient"] = state?.timeoutClient;
resourceInputs["updatedAt"] = state?.updatedAt;
}
else {
const args = argsOrState;
if (args?.backendId === undefined && !opts.urn) {
throw new Error("Missing required property 'backendId'");
}
if (args?.inboundPort === undefined && !opts.urn) {
throw new Error("Missing required property 'inboundPort'");
}
if (args?.lbId === undefined && !opts.urn) {
throw new Error("Missing required property 'lbId'");
}
resourceInputs["acls"] = args?.acls;
resourceInputs["backendId"] = args?.backendId;
resourceInputs["certificateIds"] = args?.certificateIds;
resourceInputs["connectionRateLimit"] = args?.connectionRateLimit;
resourceInputs["enableAccessLogs"] = args?.enableAccessLogs;
resourceInputs["enableHttp3"] = args?.enableHttp3;
resourceInputs["externalAcls"] = args?.externalAcls;
resourceInputs["inboundPort"] = args?.inboundPort;
resourceInputs["lbId"] = args?.lbId;
resourceInputs["name"] = args?.name;
resourceInputs["timeoutClient"] = args?.timeoutClient;
resourceInputs["certificateId"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LoadbalancerFrontend.__pulumiType, name, resourceInputs, opts);
}
}
exports.LoadbalancerFrontend = LoadbalancerFrontend;
//# sourceMappingURL=loadbalancerFrontend.js.map