@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
364 lines (363 loc) • 12.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates and manages Scaleway Load Balancers.
*
* For more information, see the [main documentation](https://www.scaleway.com/en/docs/load-balancer/concepts/#load-balancers) or [API documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-load-balancer-list-load-balancers).
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.loadbalancers.Ip("main", {zone: "fr-par-1"});
* const base = new scaleway.loadbalancers.LoadBalancer("base", {
* ipIds: [main.id],
* zone: main.zone,
* type: "LB-S",
* });
* ```
*
* ### Private LB
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const base = new scaleway.loadbalancers.LoadBalancer("base", {
* name: "private-lb",
* type: "LB-S",
* assignFlexibleIp: false,
* });
* ```
*
* ### With IPv6
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const v4 = new scaleway.loadbalancers.Ip("v4", {});
* const v6 = new scaleway.loadbalancers.Ip("v6", {isIpv6: true});
* const main = new scaleway.loadbalancers.LoadBalancer("main", {
* ipIds: [
* v4.id,
* v6.id,
* ],
* name: "ipv6-lb",
* type: "LB-S",
* });
* ```
*
* ### With IPAM IDs
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const vpc01 = new scaleway.network.Vpc("vpc01", {name: "my vpc"});
* const pn01 = new scaleway.network.PrivateNetwork("pn01", {
* vpcId: vpc01.id,
* ipv4Subnet: {
* subnet: "172.16.32.0/22",
* },
* });
* const ip01 = new scaleway.ipam.Ip("ip01", {
* address: "172.16.32.7",
* sources: [{
* privateNetworkId: pn01.id,
* }],
* });
* const v4 = new scaleway.loadbalancers.Ip("v4", {});
* const lb01 = new scaleway.loadbalancers.LoadBalancer("lb01", {
* ipIds: [v4.id],
* name: "my-lb",
* type: "LB-S",
* privateNetworks: [{
* privateNetworkId: pn01.id,
* ipamIds: ip01.id,
* }],
* });
* ```
*
* ## Migration
*
* In order to migrate to other Load Balancer types, you can check upwards or downwards migration via our CLI `scw lb lb-types list`.
* This change will not recreate your Load Balancer.
*
* Please check our [documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-load-balancer-migrate-a-load-balancer) for further details.
*
* ## Import
*
* Load Balancers can be imported using `{zone}/{id}`, e.g.
*
* bash
*
* ```sh
* $ pulumi import scaleway:index/loadbalancer:Loadbalancer main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*
* Be aware that you will also need to import the `scaleway_lb_ip` resource.
*
* @deprecated scaleway.index/loadbalancer.Loadbalancer has been deprecated in favor of scaleway.loadbalancers/loadbalancer.LoadBalancer
*/
export declare class Loadbalancer extends pulumi.CustomResource {
/**
* Get an existing Loadbalancer 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?: LoadbalancerState, opts?: pulumi.CustomResourceOptions): Loadbalancer;
/**
* Returns true if the given object is an instance of Loadbalancer. 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 Loadbalancer;
/**
* Defines whether to automatically assign a flexible public IPv4 to the Load Balancer.
*/
readonly assignFlexibleIp: pulumi.Output<boolean | undefined>;
/**
* Defines whether to automatically assign a flexible public IPv6 to the Load Balancer.
*/
readonly assignFlexibleIpv6: pulumi.Output<boolean | undefined>;
/**
* The description of the Load Balancer.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The Load Balancer public IPv4 address.
*/
readonly ipAddress: pulumi.Output<string>;
/**
* Please use `ipIds`. The ID of the associated Load Balancer IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the Load Balancer.
*
* @deprecated Please use ip_ids
*/
readonly ipId: pulumi.Output<string>;
/**
* The List of IP IDs to attach to the Load Balancer.
*
* > **Important:** Make sure to use a `scaleway.loadbalancers.Ip` resource to create the IPs.
*/
readonly ipIds: pulumi.Output<string[]>;
/**
* The Load Balancer public IPv6 address.
*/
readonly ipv6Address: pulumi.Output<string>;
/**
* The name of the Load Balancer.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the Organization ID the Load Balancer is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* The list of private IPv4 and IPv6 addresses associated with the resource.
*/
readonly privateIps: pulumi.Output<outputs.LoadbalancerPrivateIp[]>;
/**
* List of private network to connect with your load balancer.
*/
readonly privateNetworks: pulumi.Output<outputs.LoadbalancerPrivateNetwork[] | undefined>;
/**
* `projectId`) The ID of the Project the Load Balancer is associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* The region of the resource
*/
readonly region: pulumi.Output<string>;
/**
* The `releaseIp` allow the release of the IP address associated with the Load Balancer.
*
* @deprecated The resource ip will be destroyed by it's own resource. Please set this to `false`
*/
readonly releaseIp: pulumi.Output<boolean | undefined>;
/**
* Enforces minimal SSL version (in SSL/TLS offloading context). Please check [possible values](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-load-balancer-create-a-load-balancer).
*/
readonly sslCompatibilityLevel: pulumi.Output<string | undefined>;
/**
* The tags associated with the Load Balancer.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The type of the Load Balancer. Please check the migration section to upgrade the type.
*/
readonly type: pulumi.Output<string>;
/**
* `zone`) The zone of the Load Balancer.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a Loadbalancer 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/loadbalancer.Loadbalancer has been deprecated in favor of scaleway.loadbalancers/loadbalancer.LoadBalancer */
constructor(name: string, args: LoadbalancerArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Loadbalancer resources.
*/
export interface LoadbalancerState {
/**
* Defines whether to automatically assign a flexible public IPv4 to the Load Balancer.
*/
assignFlexibleIp?: pulumi.Input<boolean>;
/**
* Defines whether to automatically assign a flexible public IPv6 to the Load Balancer.
*/
assignFlexibleIpv6?: pulumi.Input<boolean>;
/**
* The description of the Load Balancer.
*/
description?: pulumi.Input<string>;
/**
* The Load Balancer public IPv4 address.
*/
ipAddress?: pulumi.Input<string>;
/**
* Please use `ipIds`. The ID of the associated Load Balancer IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the Load Balancer.
*
* @deprecated Please use ip_ids
*/
ipId?: pulumi.Input<string>;
/**
* The List of IP IDs to attach to the Load Balancer.
*
* > **Important:** Make sure to use a `scaleway.loadbalancers.Ip` resource to create the IPs.
*/
ipIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The Load Balancer public IPv6 address.
*/
ipv6Address?: pulumi.Input<string>;
/**
* The name of the Load Balancer.
*/
name?: pulumi.Input<string>;
/**
* The ID of the Organization ID the Load Balancer is associated with.
*/
organizationId?: pulumi.Input<string>;
/**
* The list of private IPv4 and IPv6 addresses associated with the resource.
*/
privateIps?: pulumi.Input<pulumi.Input<inputs.LoadbalancerPrivateIp>[]>;
/**
* List of private network to connect with your load balancer.
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.LoadbalancerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the Project the Load Balancer is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* The region of the resource
*/
region?: pulumi.Input<string>;
/**
* The `releaseIp` allow the release of the IP address associated with the Load Balancer.
*
* @deprecated The resource ip will be destroyed by it's own resource. Please set this to `false`
*/
releaseIp?: pulumi.Input<boolean>;
/**
* Enforces minimal SSL version (in SSL/TLS offloading context). Please check [possible values](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-load-balancer-create-a-load-balancer).
*/
sslCompatibilityLevel?: pulumi.Input<string>;
/**
* The tags associated with the Load Balancer.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The type of the Load Balancer. Please check the migration section to upgrade the type.
*/
type?: pulumi.Input<string>;
/**
* `zone`) The zone of the Load Balancer.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Loadbalancer resource.
*/
export interface LoadbalancerArgs {
/**
* Defines whether to automatically assign a flexible public IPv4 to the Load Balancer.
*/
assignFlexibleIp?: pulumi.Input<boolean>;
/**
* Defines whether to automatically assign a flexible public IPv6 to the Load Balancer.
*/
assignFlexibleIpv6?: pulumi.Input<boolean>;
/**
* The description of the Load Balancer.
*/
description?: pulumi.Input<string>;
/**
* Please use `ipIds`. The ID of the associated Load Balancer IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the Load Balancer.
*
* @deprecated Please use ip_ids
*/
ipId?: pulumi.Input<string>;
/**
* The List of IP IDs to attach to the Load Balancer.
*
* > **Important:** Make sure to use a `scaleway.loadbalancers.Ip` resource to create the IPs.
*/
ipIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The name of the Load Balancer.
*/
name?: pulumi.Input<string>;
/**
* List of private network to connect with your load balancer.
*/
privateNetworks?: pulumi.Input<pulumi.Input<inputs.LoadbalancerPrivateNetwork>[]>;
/**
* `projectId`) The ID of the Project the Load Balancer is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* The `releaseIp` allow the release of the IP address associated with the Load Balancer.
*
* @deprecated The resource ip will be destroyed by it's own resource. Please set this to `false`
*/
releaseIp?: pulumi.Input<boolean>;
/**
* Enforces minimal SSL version (in SSL/TLS offloading context). Please check [possible values](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api/#path-load-balancer-create-a-load-balancer).
*/
sslCompatibilityLevel?: pulumi.Input<string>;
/**
* The tags associated with the Load Balancer.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The type of the Load Balancer. Please check the migration section to upgrade the type.
*/
type: pulumi.Input<string>;
/**
* `zone`) The zone of the Load Balancer.
*/
zone?: pulumi.Input<string>;
}