@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
624 lines (623 loc) • 25.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a Dedicated load balancer copy resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const loadbalancerId = config.requireObject("loadbalancerId");
* const ipv4SubnetId = config.requireObject("ipv4SubnetId");
* const ipv6NetworkId = config.requireObject("ipv6NetworkId");
* const backendSubnetId = config.requireObject("backendSubnetId");
* const l4FlavorId = config.requireObject("l4FlavorId");
* const l7FlavorId = config.requireObject("l7FlavorId");
* const ipv6BandwidthId = config.requireObject("ipv6BandwidthId");
* const test = new huaweicloud.dedicatedelb.LoadbalancerCopy("test", {
* loadbalancerId: loadbalancerId,
* availabilityZones: [
* "cn-north-4a",
* "cn-north-4b",
* ],
* ipv4SubnetId: ipv4SubnetId,
* ipv4Address: "192.168.0.216",
* ipv6NetworkId: ipv6NetworkId,
* ipv6Address: "2407:c080:1200:2a02:34e6:8059:ce7f:1add",
* backendSubnets: [backendSubnetId],
* l4FlavorId: l4FlavorId,
* l7FlavorId: l7FlavorId,
* reusePool: "true",
* description: "test elb description",
* ipv6BandwidthId: ipv6BandwidthId,
* crossVpcBackend: "true",
* protectionStatus: "consoleProtection",
* protectionReason: "test protection reason",
* deletionProtectionEnable: "true",
* wafFailureAction: "discard",
* });
* ```
*
* ## Import
*
* The ELB load balancer copy can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:DedicatedElb/loadbalancerCopy:LoadbalancerCopy test <id>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`loadbalancer_id`, `ipv6_bandwidth_id`, `deletion_protection_enable`, `reuse_pool`,
*
* `period_unit`, `period`, `auto_renew` and `force_delete`. It is generally recommended running `terraform plan` after importing a load balancer copy. You can then decide if changes should be applied to the load balancer copy, or the resource definition should be updated to align with the load balancer. Also you can ignore changes as below. hcl resource "huaweicloud_elb_loadbalancer_copy" "test" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* loadbalancer_id, ipv6_bandwidth_id, deletion_protection_enable, reuse_pool, period_unit, period, auto_renew,
*
* force_delete,
*
* ]
*
* } }
*/
export declare class LoadbalancerCopy extends pulumi.CustomResource {
/**
* Get an existing LoadbalancerCopy 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?: LoadbalancerCopyState, opts?: pulumi.CustomResourceOptions): LoadbalancerCopy;
/**
* Returns true if the given object is an instance of LoadbalancerCopy. 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 LoadbalancerCopy;
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
readonly autoRenew: pulumi.Output<string | undefined>;
/**
* Specifies the list of AZ names.
*/
readonly availabilityZones: pulumi.Output<string[]>;
/**
* Specifies the ID of the backend subnet of the load balancer. If it is not specified,
* the backend subnet of the original load balancer is used. The subnets where the original and new load balancers work must
* be in the same VPC.
*/
readonly backendSubnets: pulumi.Output<string[]>;
/**
* Indicates the billing mode. The value can be:
* + **flavor**: Billed by the specifications you will select.
* + **lcu**: Billed by LCU usage.
*/
readonly chargeMode: pulumi.Output<string>;
/**
* Specifies the charging mode of the ELB load balancer.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Indicates the time when the load balancer was created, in RFC3339 format.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Specifies whether to add backend servers that are not in the load balancer's
* VPC. Can only be **true** when updating. Value options: **true**, **false**.
*/
readonly crossVpcBackend: pulumi.Output<string>;
/**
* Specifies whether to enable deletion protection for the load balancer.
* Value options:
* + **true**: Enable deletion protection.
* + **false**: Disable deletion protection.
*/
readonly deletionProtectionEnable: pulumi.Output<string>;
/**
* Specifies the description of the load balancer.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Indicates the type of the subnet on the downstream plane. The value can be:
* + **ipv4**: IPv4 subnet
* + **dualstack**: subnet that supports IPv4/IPv6 dual stack
*/
readonly elbVirsubnetType: pulumi.Output<string>;
readonly enableForceNew: pulumi.Output<string | undefined>;
/**
* The enterprise project ID of the load balancer.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* Specifies whether to forcibly delete the load balancer, remove the load
* balancer, listeners, unbind associated pools. Defaults to **false**.
*/
readonly forceDelete: pulumi.Output<boolean | undefined>;
/**
* Indicates the scenario where the load balancer is frozen. Multiple values are separated using commas (,).
* The value can be:
* + **POLICE**: The load balancer is frozen due to security reasons.
* + **ILLEGAL**: The load balancer is frozen due to violation of laws and regulations.
* + **VERIFY**: Your account has not completed real-name authentication.
* + **PARTNER**: The load balancer is frozen by the partner.
* + **ARREAR**: Your account is in arrears.
*/
readonly frozenScene: pulumi.Output<string>;
/**
* Indicates the flavor ID of the gateway load balancer.
*/
readonly gwFlavorId: pulumi.Output<string>;
/**
* Specifies the private IPv4 address of the load balancer.
*/
readonly ipv4Address: pulumi.Output<string>;
/**
* Indicates the ID of the port bound to the private IPv4 address of the load balancer.
*/
readonly ipv4PortId: pulumi.Output<string>;
/**
* Specifies the ID of the IPv4 subnet where the load balancer works. If it is not
* specified, the IPv4 subnet of the original load balancer is used. The subnets where the original and new load balancers
* work must be in the same VPC.
*/
readonly ipv4SubnetId: pulumi.Output<string>;
/**
* Specifies the private IPv6 address of the load balancer.
*/
readonly ipv6Address: pulumi.Output<string>;
/**
* Specifies the ipv6 bandwidth ID. Only support shared bandwidth.
*/
readonly ipv6BandwidthId: pulumi.Output<string | undefined>;
/**
* Specifies the ID of the IPv6 subnet where the new load balancer works. If it is
* not specified, the IPv6 subnet of the original load balancer is used. The subnets where the original and new load
* balancers work must be in the same VPC.
*/
readonly ipv6NetworkId: pulumi.Output<string>;
/**
* Specifies the Layer 4 specifications of the new load balancer. If it is not specified,
* the Layer 4 specifications of the original load balancer are used.
*/
readonly l4FlavorId: pulumi.Output<string>;
/**
* Specifies the Layer 7 specifications of the new load balancer. If it is not specified,
* the Layer 7 specifications of the original load balancer are used.
*/
readonly l7FlavorId: pulumi.Output<string>;
/**
* Specifies the source load balancer ID.
*/
readonly loadbalancerId: pulumi.Output<string>;
/**
* Indicates the type of the load balancer.
*/
readonly loadbalancerType: pulumi.Output<string>;
/**
* Specifies the load balancer name.
*/
readonly name: pulumi.Output<string>;
/**
* Indicates the operating status of the load balancer. The value can be:
* + **ONLINE**: indicates that the load balancer is running normally.
* + **FROZEN**: indicates that the load balancer is frozen.
*/
readonly operatingStatus: pulumi.Output<string>;
/**
* Specifies the charging period of the ELB load balancer.
* If `periodUnit` is set to **month**, the value ranges from `1` to `9`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the ELB load balancer.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the reason for update protection. Only valid when `protectionStatus`
* is **consoleProtection**.
*/
readonly protectionReason: pulumi.Output<string | undefined>;
/**
* Specifies the protection status for update. Value options:
* + **nonProtection**: No protection.
* + **consoleProtection**: Console modification protection.
*/
readonly protectionStatus: pulumi.Output<string>;
/**
* Indicates the AZ group to which the load balancer belongs.
*/
readonly publicBorderGroup: pulumi.Output<string>;
/**
* The region in which to create the load balancer resource. If omitted, the
* provider-level region will be used. Changing this creates a new load balancer.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies whether to reuse the backend server group and backend server
* ID of the original load balancer.
* + If it is set to **true**, the backend server group of the original load balancer will be used.
* + If no backend server group is selected, a new backend server group is created by default.
* + It is invalid when `enterpriseProjectId` is set to another enterprise project.
*/
readonly reusePool: pulumi.Output<string | undefined>;
/**
* The key/value pairs to associate with the load balancer.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Indicates the time when the load balancer was updated, in RFC3339 format.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Indicates the ID of the VPC where the load balancer resides.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Specifies traffic distributing policies when the WAF is faulty.
* Value options:
* + **discard**: Traffic will not be distributed.
* + **forward**: Traffic will be distributed to the default backend servers.
*/
readonly wafFailureAction: pulumi.Output<string>;
/**
* Create a LoadbalancerCopy 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: LoadbalancerCopyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering LoadbalancerCopy resources.
*/
export interface LoadbalancerCopyState {
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the list of AZ names.
*/
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the ID of the backend subnet of the load balancer. If it is not specified,
* the backend subnet of the original load balancer is used. The subnets where the original and new load balancers work must
* be in the same VPC.
*/
backendSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Indicates the billing mode. The value can be:
* + **flavor**: Billed by the specifications you will select.
* + **lcu**: Billed by LCU usage.
*/
chargeMode?: pulumi.Input<string>;
/**
* Specifies the charging mode of the ELB load balancer.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
chargingMode?: pulumi.Input<string>;
/**
* Indicates the time when the load balancer was created, in RFC3339 format.
*/
createdAt?: pulumi.Input<string>;
/**
* Specifies whether to add backend servers that are not in the load balancer's
* VPC. Can only be **true** when updating. Value options: **true**, **false**.
*/
crossVpcBackend?: pulumi.Input<string>;
/**
* Specifies whether to enable deletion protection for the load balancer.
* Value options:
* + **true**: Enable deletion protection.
* + **false**: Disable deletion protection.
*/
deletionProtectionEnable?: pulumi.Input<string>;
/**
* Specifies the description of the load balancer.
*/
description?: pulumi.Input<string>;
/**
* Indicates the type of the subnet on the downstream plane. The value can be:
* + **ipv4**: IPv4 subnet
* + **dualstack**: subnet that supports IPv4/IPv6 dual stack
*/
elbVirsubnetType?: pulumi.Input<string>;
enableForceNew?: pulumi.Input<string>;
/**
* The enterprise project ID of the load balancer.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies whether to forcibly delete the load balancer, remove the load
* balancer, listeners, unbind associated pools. Defaults to **false**.
*/
forceDelete?: pulumi.Input<boolean>;
/**
* Indicates the scenario where the load balancer is frozen. Multiple values are separated using commas (,).
* The value can be:
* + **POLICE**: The load balancer is frozen due to security reasons.
* + **ILLEGAL**: The load balancer is frozen due to violation of laws and regulations.
* + **VERIFY**: Your account has not completed real-name authentication.
* + **PARTNER**: The load balancer is frozen by the partner.
* + **ARREAR**: Your account is in arrears.
*/
frozenScene?: pulumi.Input<string>;
/**
* Indicates the flavor ID of the gateway load balancer.
*/
gwFlavorId?: pulumi.Input<string>;
/**
* Specifies the private IPv4 address of the load balancer.
*/
ipv4Address?: pulumi.Input<string>;
/**
* Indicates the ID of the port bound to the private IPv4 address of the load balancer.
*/
ipv4PortId?: pulumi.Input<string>;
/**
* Specifies the ID of the IPv4 subnet where the load balancer works. If it is not
* specified, the IPv4 subnet of the original load balancer is used. The subnets where the original and new load balancers
* work must be in the same VPC.
*/
ipv4SubnetId?: pulumi.Input<string>;
/**
* Specifies the private IPv6 address of the load balancer.
*/
ipv6Address?: pulumi.Input<string>;
/**
* Specifies the ipv6 bandwidth ID. Only support shared bandwidth.
*/
ipv6BandwidthId?: pulumi.Input<string>;
/**
* Specifies the ID of the IPv6 subnet where the new load balancer works. If it is
* not specified, the IPv6 subnet of the original load balancer is used. The subnets where the original and new load
* balancers work must be in the same VPC.
*/
ipv6NetworkId?: pulumi.Input<string>;
/**
* Specifies the Layer 4 specifications of the new load balancer. If it is not specified,
* the Layer 4 specifications of the original load balancer are used.
*/
l4FlavorId?: pulumi.Input<string>;
/**
* Specifies the Layer 7 specifications of the new load balancer. If it is not specified,
* the Layer 7 specifications of the original load balancer are used.
*/
l7FlavorId?: pulumi.Input<string>;
/**
* Specifies the source load balancer ID.
*/
loadbalancerId?: pulumi.Input<string>;
/**
* Indicates the type of the load balancer.
*/
loadbalancerType?: pulumi.Input<string>;
/**
* Specifies the load balancer name.
*/
name?: pulumi.Input<string>;
/**
* Indicates the operating status of the load balancer. The value can be:
* + **ONLINE**: indicates that the load balancer is running normally.
* + **FROZEN**: indicates that the load balancer is frozen.
*/
operatingStatus?: pulumi.Input<string>;
/**
* Specifies the charging period of the ELB load balancer.
* If `periodUnit` is set to **month**, the value ranges from `1` to `9`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the ELB load balancer.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the reason for update protection. Only valid when `protectionStatus`
* is **consoleProtection**.
*/
protectionReason?: pulumi.Input<string>;
/**
* Specifies the protection status for update. Value options:
* + **nonProtection**: No protection.
* + **consoleProtection**: Console modification protection.
*/
protectionStatus?: pulumi.Input<string>;
/**
* Indicates the AZ group to which the load balancer belongs.
*/
publicBorderGroup?: pulumi.Input<string>;
/**
* The region in which to create the load balancer resource. If omitted, the
* provider-level region will be used. Changing this creates a new load balancer.
*/
region?: pulumi.Input<string>;
/**
* Specifies whether to reuse the backend server group and backend server
* ID of the original load balancer.
* + If it is set to **true**, the backend server group of the original load balancer will be used.
* + If no backend server group is selected, a new backend server group is created by default.
* + It is invalid when `enterpriseProjectId` is set to another enterprise project.
*/
reusePool?: pulumi.Input<string>;
/**
* The key/value pairs to associate with the load balancer.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Indicates the time when the load balancer was updated, in RFC3339 format.
*/
updatedAt?: pulumi.Input<string>;
/**
* Indicates the ID of the VPC where the load balancer resides.
*/
vpcId?: pulumi.Input<string>;
/**
* Specifies traffic distributing policies when the WAF is faulty.
* Value options:
* + **discard**: Traffic will not be distributed.
* + **forward**: Traffic will be distributed to the default backend servers.
*/
wafFailureAction?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a LoadbalancerCopy resource.
*/
export interface LoadbalancerCopyArgs {
/**
* Specifies whether auto-renew is enabled. Valid values are **true** and **false**.
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the list of AZ names.
*/
availabilityZones?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the ID of the backend subnet of the load balancer. If it is not specified,
* the backend subnet of the original load balancer is used. The subnets where the original and new load balancers work must
* be in the same VPC.
*/
backendSubnets?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the charging mode of the ELB load balancer.
* Valid values are **prePaid** and **postPaid**, defaults to **postPaid**.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies whether to add backend servers that are not in the load balancer's
* VPC. Can only be **true** when updating. Value options: **true**, **false**.
*/
crossVpcBackend?: pulumi.Input<string>;
/**
* Specifies whether to enable deletion protection for the load balancer.
* Value options:
* + **true**: Enable deletion protection.
* + **false**: Disable deletion protection.
*/
deletionProtectionEnable?: pulumi.Input<string>;
/**
* Specifies the description of the load balancer.
*/
description?: pulumi.Input<string>;
enableForceNew?: pulumi.Input<string>;
/**
* The enterprise project ID of the load balancer.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies whether to forcibly delete the load balancer, remove the load
* balancer, listeners, unbind associated pools. Defaults to **false**.
*/
forceDelete?: pulumi.Input<boolean>;
/**
* Specifies the private IPv4 address of the load balancer.
*/
ipv4Address?: pulumi.Input<string>;
/**
* Specifies the ID of the IPv4 subnet where the load balancer works. If it is not
* specified, the IPv4 subnet of the original load balancer is used. The subnets where the original and new load balancers
* work must be in the same VPC.
*/
ipv4SubnetId?: pulumi.Input<string>;
/**
* Specifies the private IPv6 address of the load balancer.
*/
ipv6Address?: pulumi.Input<string>;
/**
* Specifies the ipv6 bandwidth ID. Only support shared bandwidth.
*/
ipv6BandwidthId?: pulumi.Input<string>;
/**
* Specifies the ID of the IPv6 subnet where the new load balancer works. If it is
* not specified, the IPv6 subnet of the original load balancer is used. The subnets where the original and new load
* balancers work must be in the same VPC.
*/
ipv6NetworkId?: pulumi.Input<string>;
/**
* Specifies the Layer 4 specifications of the new load balancer. If it is not specified,
* the Layer 4 specifications of the original load balancer are used.
*/
l4FlavorId?: pulumi.Input<string>;
/**
* Specifies the Layer 7 specifications of the new load balancer. If it is not specified,
* the Layer 7 specifications of the original load balancer are used.
*/
l7FlavorId?: pulumi.Input<string>;
/**
* Specifies the source load balancer ID.
*/
loadbalancerId: pulumi.Input<string>;
/**
* Specifies the load balancer name.
*/
name?: pulumi.Input<string>;
/**
* Specifies the charging period of the ELB load balancer.
* If `periodUnit` is set to **month**, the value ranges from `1` to `9`.
* If `periodUnit` is set to **year**, the value ranges from `1` to `3`.
* This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the ELB load balancer.
* Valid values are **month** and **year**. This parameter is mandatory if `chargingMode` is set to **prePaid**.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the reason for update protection. Only valid when `protectionStatus`
* is **consoleProtection**.
*/
protectionReason?: pulumi.Input<string>;
/**
* Specifies the protection status for update. Value options:
* + **nonProtection**: No protection.
* + **consoleProtection**: Console modification protection.
*/
protectionStatus?: pulumi.Input<string>;
/**
* The region in which to create the load balancer resource. If omitted, the
* provider-level region will be used. Changing this creates a new load balancer.
*/
region?: pulumi.Input<string>;
/**
* Specifies whether to reuse the backend server group and backend server
* ID of the original load balancer.
* + If it is set to **true**, the backend server group of the original load balancer will be used.
* + If no backend server group is selected, a new backend server group is created by default.
* + It is invalid when `enterpriseProjectId` is set to another enterprise project.
*/
reusePool?: pulumi.Input<string>;
/**
* The key/value pairs to associate with the load balancer.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies traffic distributing policies when the WAF is faulty.
* Value options:
* + **discard**: Traffic will not be distributed.
* + **forward**: Traffic will be distributed to the default backend servers.
*/
wafFailureAction?: pulumi.Input<string>;
}