UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

250 lines 9.73 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * 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 */ export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: EdgeServicesBackendStageState, opts?: pulumi.CustomResourceOptions): 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: any): obj is EdgeServicesBackendStage; /** * The Scaleway Serverless Container backend linked to the backend stage. */ readonly containerBackendConfig: pulumi.Output<outputs.EdgeServicesBackendStageContainerBackendConfig | undefined>; /** * The date and time of the creation of the backend stage. */ readonly createdAt: pulumi.Output<string>; /** * The Scaleway Serverless Function backend linked to the backend stage. */ readonly functionBackendConfig: pulumi.Output<outputs.EdgeServicesBackendStageFunctionBackendConfig | undefined>; /** * The Scaleway Load Balancer linked to the backend stage. */ readonly lbBackendConfigs: pulumi.Output<outputs.EdgeServicesBackendStageLbBackendConfig[] | undefined>; /** * The ID of the pipeline. */ readonly pipelineId: pulumi.Output<string>; /** * `projectId`) The ID of the project the backend stage is associated with. * * > **Important:** `s3BackendConfig`, `lbBackendConfig`, `containerBackendConfig` and `functionBackendConfig` are mutually exclusive. */ readonly projectId: pulumi.Output<string>; /** * The Scaleway Object Storage origin bucket (S3) linked to the backend stage. */ readonly s3BackendConfig: pulumi.Output<outputs.EdgeServicesBackendStageS3BackendConfig | undefined>; /** * The date and time of the last update of the backend stage. */ readonly updatedAt: pulumi.Output<string>; /** * Create a EdgeServicesBackendStage 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. */ /** @deprecated scaleway.index/edgeservicesbackendstage.EdgeServicesBackendStage has been deprecated in favor of scaleway.edgeservices/backendstage.BackendStage */ constructor(name: string, args: EdgeServicesBackendStageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering EdgeServicesBackendStage resources. */ export interface EdgeServicesBackendStageState { /** * The Scaleway Serverless Container backend linked to the backend stage. */ containerBackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageContainerBackendConfig | undefined>; /** * The date and time of the creation of the backend stage. */ createdAt?: pulumi.Input<string | undefined>; /** * The Scaleway Serverless Function backend linked to the backend stage. */ functionBackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageFunctionBackendConfig | undefined>; /** * The Scaleway Load Balancer linked to the backend stage. */ lbBackendConfigs?: pulumi.Input<pulumi.Input<inputs.EdgeServicesBackendStageLbBackendConfig>[] | undefined>; /** * The ID of the pipeline. */ pipelineId?: pulumi.Input<string | undefined>; /** * `projectId`) The ID of the project the backend stage is associated with. * * > **Important:** `s3BackendConfig`, `lbBackendConfig`, `containerBackendConfig` and `functionBackendConfig` are mutually exclusive. */ projectId?: pulumi.Input<string | undefined>; /** * The Scaleway Object Storage origin bucket (S3) linked to the backend stage. */ s3BackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageS3BackendConfig | undefined>; /** * The date and time of the last update of the backend stage. */ updatedAt?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a EdgeServicesBackendStage resource. */ export interface EdgeServicesBackendStageArgs { /** * The Scaleway Serverless Container backend linked to the backend stage. */ containerBackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageContainerBackendConfig | undefined>; /** * The Scaleway Serverless Function backend linked to the backend stage. */ functionBackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageFunctionBackendConfig | undefined>; /** * The Scaleway Load Balancer linked to the backend stage. */ lbBackendConfigs?: pulumi.Input<pulumi.Input<inputs.EdgeServicesBackendStageLbBackendConfig>[] | undefined>; /** * The ID of the pipeline. */ pipelineId: pulumi.Input<string>; /** * `projectId`) The ID of the project the backend stage is associated with. * * > **Important:** `s3BackendConfig`, `lbBackendConfig`, `containerBackendConfig` and `functionBackendConfig` are mutually exclusive. */ projectId?: pulumi.Input<string | undefined>; /** * The Scaleway Object Storage origin bucket (S3) linked to the backend stage. */ s3BackendConfig?: pulumi.Input<inputs.EdgeServicesBackendStageS3BackendConfig | undefined>; } //# sourceMappingURL=edgeServicesBackendStage.d.ts.map