@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
191 lines (190 loc) • 7.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates and manages Scaleway Load-Balancer Routes.
* For more information, see [the documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-route).
*
* ## Examples
*
* ### With SNI for direction to TCP backends
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const ip01 = new scaleway.LoadbalancerIp("ip01", {});
* const lb01 = new scaleway.Loadbalancer("lb01", {
* ipId: ip01.id,
* type: "lb-s",
* });
* const bkd01 = new scaleway.LoadbalancerBackend("bkd01", {
* lbId: lb01.id,
* forwardProtocol: "tcp",
* forwardPort: 80,
* proxyProtocol: "none",
* });
* const frt01 = new scaleway.LoadbalancerFrontend("frt01", {
* lbId: lb01.id,
* backendId: bkd01.id,
* inboundPort: 80,
* });
* const rt01 = new scaleway.LoadbalancerRoute("rt01", {
* frontendId: frt01.id,
* backendId: bkd01.id,
* matchSni: "sni.scaleway.com",
* });
* ```
*
* ### With host-header for direction to HTTP backends
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const ip01 = new scaleway.LoadbalancerIp("ip01", {});
* const lb01 = new scaleway.Loadbalancer("lb01", {
* ipId: ip01.id,
* type: "lb-s",
* });
* const bkd01 = new scaleway.LoadbalancerBackend("bkd01", {
* lbId: lb01.id,
* forwardProtocol: "http",
* forwardPort: 80,
* proxyProtocol: "none",
* });
* const frt01 = new scaleway.LoadbalancerFrontend("frt01", {
* lbId: lb01.id,
* backendId: bkd01.id,
* inboundPort: 80,
* });
* const rt01 = new scaleway.LoadbalancerRoute("rt01", {
* frontendId: frt01.id,
* backendId: bkd01.id,
* matchHostHeader: "host.scaleway.com",
* });
* ```
*
* ## Import
*
* Load-Balancer frontend can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/loadbalancerRoute:LoadbalancerRoute main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class LoadbalancerRoute extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerRoute 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?: LoadbalancerRouteState, opts?: pulumi.CustomResourceOptions): LoadbalancerRoute;
/**
* Returns true if the given object is an instance of LoadbalancerRoute. 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 LoadbalancerRoute;
/**
* The ID of the backend to which the route is associated.
*/
readonly backendId: pulumi.Output<string>;
/**
* The date at which the route was created.
*/
readonly createdAt: pulumi.Output<string>;
/**
* The ID of the frontend to which the route is associated.
*/
readonly frontendId: pulumi.Output<string>;
/**
* The HTTP host header to match. Value to match in the HTTP Host request header from an incoming connection.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on HTTP Load Balancers.
*/
readonly matchHostHeader: pulumi.Output<string | undefined>;
/**
* The Server Name Indication (SNI) value to match. Value to match in the Server Name Indication TLS extension (SNI) field from an incoming connection made via an SSL/TLS transport layer.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on TCP Load Balancers.
*/
readonly matchSni: pulumi.Output<string | undefined>;
/**
* The date at which the route was last updated.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Create a LoadbalancerRoute 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: LoadbalancerRouteArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering LoadbalancerRoute resources.
*/
export interface LoadbalancerRouteState {
/**
* The ID of the backend to which the route is associated.
*/
backendId?: pulumi.Input<string>;
/**
* The date at which the route was created.
*/
createdAt?: pulumi.Input<string>;
/**
* The ID of the frontend to which the route is associated.
*/
frontendId?: pulumi.Input<string>;
/**
* The HTTP host header to match. Value to match in the HTTP Host request header from an incoming connection.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on HTTP Load Balancers.
*/
matchHostHeader?: pulumi.Input<string>;
/**
* The Server Name Indication (SNI) value to match. Value to match in the Server Name Indication TLS extension (SNI) field from an incoming connection made via an SSL/TLS transport layer.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on TCP Load Balancers.
*/
matchSni?: pulumi.Input<string>;
/**
* The date at which the route was last updated.
*/
updatedAt?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a LoadbalancerRoute resource.
*/
export interface LoadbalancerRouteArgs {
/**
* The ID of the backend to which the route is associated.
*/
backendId: pulumi.Input<string>;
/**
* The ID of the frontend to which the route is associated.
*/
frontendId: pulumi.Input<string>;
/**
* The HTTP host header to match. Value to match in the HTTP Host request header from an incoming connection.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on HTTP Load Balancers.
*/
matchHostHeader?: pulumi.Input<string>;
/**
* The Server Name Indication (SNI) value to match. Value to match in the Server Name Indication TLS extension (SNI) field from an incoming connection made via an SSL/TLS transport layer.
* Only one of `matchSni` and `matchHostHeader` should be specified.
*
* > **Important:** This field should be set for routes on TCP Load Balancers.
*/
matchSni?: pulumi.Input<string>;
}