@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
341 lines (340 loc) • 11.6 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 documentation](https://www.scaleway.com/en/developers/api/load-balancer/zoned-api).
*
* ## Examples
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.LoadbalancerIp("main", {zone: "fr-par-1"});
* const base = new scaleway.Loadbalancer("base", {
* ipId: main.id,
* zone: main.zone,
* type: "LB-S",
* });
* ```
*
* ### Private LB
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const base = new scaleway.Loadbalancer("base", {
* ipId: scaleway_lb_ip.main.id,
* zone: scaleway_lb_ip.main.zone,
* type: "LB-S",
* assignFlexibleIp: false,
* });
* ```
*
* ### IP for Public Gateway
* resource "scaleway_vpc_public_gateway_ip" "main" {
* }
*
* ### Scaleway Private Network
* resource scaleway_vpc_private_network main {
* }
*
* ### VPC Public Gateway Network
* resource "scaleway_vpc_public_gateway" "main" {
* name = "tf-test-public-gw"
* type = "VPC-GW-S"
* ip_id = scaleway_vpc_public_gateway_ip.main.id
* }
*
* ### VPC Public Gateway Network DHCP config
* resource "scaleway_vpc_public_gateway_dhcp" "main" {
* subnet = "10.0.0.0/24"
* }
*
* ### VPC Gateway Network
* resource "scaleway_vpc_gateway_network" "main" {
* gateway_id = scaleway_vpc_public_gateway.main.id
* private_network_id = scaleway_vpc_private_network.main.id
* dhcp_id = scaleway_vpc_public_gateway_dhcp.main.id
* cleanup_dhcp = true
* enable_masquerade = true
* }
*
* ### Scaleway Instance
* resource "scaleway_instance_server" "main" {
* name = "Scaleway Terraform Provider"
* type = "DEV1-S"
* image = "debian_bullseye"
* enable_ipv6 = false
*
* private_network {
* pn_id = scaleway_vpc_private_network.main.id
* }
* }
*
* ### IP for LB IP
* resource scaleway_lb_ip main {
* }
*
* ### Scaleway Private Network
* resource scaleway_vpc_private_network "main" {
* name = "private network with static config"
* }
*
* ## Migration
*
* In order to migrate to other types you can check the migration up or down 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
*
* ## IP ID
*
* Since v1.15.0, `ipId` is a required field. This means that now a separate `scaleway.LoadbalancerIp` is required.
* When importing, the IP needs to be imported as well as the LB.
* When upgrading to v1.15.0, you will need to create a new `scaleway.LoadbalancerIp` resource and import it.
*
* For instance, if you had the following:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.Loadbalancer("main", {
* type: "LB-S",
* zone: "fr-par-1",
* });
* ```
*
* You will need to update it to:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const mainLoadbalancerIp = new scaleway.LoadbalancerIp("mainLoadbalancerIp", {});
* const mainLoadbalancer = new scaleway.Loadbalancer("mainLoadbalancer", {
* ipId: mainLoadbalancerIp.id,
* zone: "fr-par-1",
* type: "LB-S",
* releaseIp: false,
* });
* ```
*
* ## Import
*
* Load-Balancer can be imported using the `{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.
*/
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 IP to the load-balancer.
*/
readonly assignFlexibleIp: pulumi.Output<boolean | undefined>;
/**
* The description of the load-balancer.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The load-balance public IP Address
*/
readonly ipAddress: pulumi.Output<string>;
/**
* The ID of the associated LB IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the load-balancer.
*/
readonly ipId: pulumi.Output<string | undefined>;
/**
* The name of the load-balancer.
*/
readonly name: pulumi.Output<string>;
/**
* The organization ID the load-balancer is associated with.
*/
readonly organizationId: pulumi.Output<string>;
/**
* 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 release the ip address associated with the load-balancers.
*
* @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-balancers.
*/
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.
*/
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 IP to the load-balancer.
*/
assignFlexibleIp?: pulumi.Input<boolean>;
/**
* The description of the load-balancer.
*/
description?: pulumi.Input<string>;
/**
* The load-balance public IP Address
*/
ipAddress?: pulumi.Input<string>;
/**
* The ID of the associated LB IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the load-balancer.
*/
ipId?: pulumi.Input<string>;
/**
* The name of the load-balancer.
*/
name?: pulumi.Input<string>;
/**
* The organization ID the load-balancer is associated with.
*/
organizationId?: 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 region of the resource
*/
region?: pulumi.Input<string>;
/**
* The releaseIp allow release the ip address associated with the load-balancers.
*
* @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-balancers.
*/
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 IP to the load-balancer.
*/
assignFlexibleIp?: pulumi.Input<boolean>;
/**
* The description of the load-balancer.
*/
description?: pulumi.Input<string>;
/**
* The ID of the associated LB IP. See below.
*
* > **Important:** Updates to `ipId` will recreate the load-balancer.
*/
ipId?: 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 release the ip address associated with the load-balancers.
*
* @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-balancers.
*/
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>;
}