UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

208 lines 8.57 kB
"use strict"; // *** 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.EdgeServicesBackendStage = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * Creates and manages Scaleway Edge Services Backend Stages. * * ## Example Usage * * ### With object backend * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.object.Bucket("main", { * name: "my-bucket-name", * tags: { * foo: "bar", * }, * }); * const mainPipeline = new scaleway.edgeservices.Pipeline("main", {name: "my-pipeline"}); * const mainBackendStage = new scaleway.edgeservices.BackendStage("main", { * pipelineId: mainPipeline.id, * s3BackendConfig: { * bucketName: main.name, * bucketRegion: "fr-par", * }, * }); * ``` * * ### With LB backend * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.loadbalancers.LoadBalancer("main", { * ipIds: [mainScalewayLbIp.id], * zone: "fr-par-1", * type: "LB-S", * }); * const mainFrontend = new scaleway.loadbalancers.Frontend("main", { * lbId: main.id, * backendId: mainScalewayLbBackend.id, * name: "frontend01", * inboundPort: 443, * certificateIds: [cert01.id], * }); * const mainPipeline = new scaleway.edgeservices.Pipeline("main", {name: "my-pipeline"}); * const mainBackendStage = new scaleway.edgeservices.BackendStage("main", { * pipelineId: mainPipeline.id, * lbBackendConfigs: [{ * lbConfig: { * id: main.id, * frontendId: id, * isSsl: true, * zone: "fr-par-1", * }, * }], * }); * ``` * * ### With Serverless Container backend * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.containers.Namespace("main", {name: "my-namespace"}); * const mainContainer = new scaleway.containers.Container("main", { * namespaceId: main.id, * name: "my-container", * image: "nginx:1.29.4-alpine", * port: 80, * }); * const mainPipeline = new scaleway.edgeservices.Pipeline("main", {name: "my-pipeline"}); * const mainBackendStage = new scaleway.edgeservices.BackendStage("main", { * pipelineId: mainPipeline.id, * containerBackendConfig: { * containerId: mainContainer.id, * region: "fr-par", * }, * }); * ``` * * ### With Serverless Function backend * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.functions.Namespace("main", {name: "my-namespace"}); * const mainFunction = new scaleway.functions.Function("main", { * namespaceId: main.id, * name: "my-function", * runtime: "node20", * privacy: "private", * handler: "handler.handle", * }); * const mainPipeline = new scaleway.edgeservices.Pipeline("main", {name: "my-pipeline"}); * const mainBackendStage = new scaleway.edgeservices.BackendStage("main", { * pipelineId: mainPipeline.id, * functionBackendConfig: { * functionId: mainFunction.id, * region: "fr-par", * }, * }); * ``` * * ## Import * * Backend stages can be imported using the `{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/edgeServicesBackendStage:EdgeServicesBackendStage basic 11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/edgeservicesbackendstage.EdgeServicesBackendStage has been deprecated in favor of scaleway.edgeservices/backendstage.BackendStage */ class EdgeServicesBackendStage extends pulumi.CustomResource { /** * Get an existing EdgeServicesBackendStage 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("EdgeServicesBackendStage is deprecated: scaleway.index/edgeservicesbackendstage.EdgeServicesBackendStage has been deprecated in favor of scaleway.edgeservices/backendstage.BackendStage"); return new EdgeServicesBackendStage(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/edgeServicesBackendStage:EdgeServicesBackendStage'; /** * Returns true if the given object is an instance of EdgeServicesBackendStage. 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'] === EdgeServicesBackendStage.__pulumiType; } /** @deprecated scaleway.index/edgeservicesbackendstage.EdgeServicesBackendStage has been deprecated in favor of scaleway.edgeservices/backendstage.BackendStage */ constructor(name, argsOrState, opts) { pulumi.log.warn("EdgeServicesBackendStage is deprecated: scaleway.index/edgeservicesbackendstage.EdgeServicesBackendStage has been deprecated in favor of scaleway.edgeservices/backendstage.BackendStage"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["containerBackendConfig"] = state?.containerBackendConfig; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["functionBackendConfig"] = state?.functionBackendConfig; resourceInputs["lbBackendConfigs"] = state?.lbBackendConfigs; resourceInputs["pipelineId"] = state?.pipelineId; resourceInputs["projectId"] = state?.projectId; resourceInputs["s3BackendConfig"] = state?.s3BackendConfig; resourceInputs["updatedAt"] = state?.updatedAt; } else { const args = argsOrState; if (args?.pipelineId === undefined && !opts.urn) { throw new Error("Missing required property 'pipelineId'"); } resourceInputs["containerBackendConfig"] = args?.containerBackendConfig; resourceInputs["functionBackendConfig"] = args?.functionBackendConfig; resourceInputs["lbBackendConfigs"] = args?.lbBackendConfigs; resourceInputs["pipelineId"] = args?.pipelineId; resourceInputs["projectId"] = args?.projectId; resourceInputs["s3BackendConfig"] = args?.s3BackendConfig; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EdgeServicesBackendStage.__pulumiType, name, resourceInputs, opts); } } exports.EdgeServicesBackendStage = EdgeServicesBackendStage; //# sourceMappingURL=edgeServicesBackendStage.js.map