@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
283 lines (282 loc) • 10.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a resource to manage alb
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@pulumi/volcengine";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = volcengine.alb.getZones({});
* const vpcIpv6 = new volcengine.vpc.Vpc("vpcIpv6", {
* vpcName: "acc-test-vpc-ipv6",
* cidrBlock: "172.16.0.0/16",
* enableIpv6: true,
* });
* const subnetIpv61 = new volcengine.vpc.Subnet("subnetIpv61", {
* subnetName: "acc-test-subnet-ipv6-1",
* cidrBlock: "172.16.1.0/24",
* zoneId: foo.then(foo => foo.zones?.[0]?.id),
* vpcId: vpcIpv6.id,
* ipv6CidrBlock: 1,
* });
* const subnetIpv62 = new volcengine.vpc.Subnet("subnetIpv62", {
* subnetName: "acc-test-subnet-ipv6-2",
* cidrBlock: "172.16.2.0/24",
* zoneId: foo.then(foo => foo.zones?.[1]?.id),
* vpcId: vpcIpv6.id,
* ipv6CidrBlock: 2,
* });
* const ipv6Gateway = new volcengine.vpc.Ipv6Gateway("ipv6Gateway", {vpcId: vpcIpv6.id});
* const alb_private = new volcengine.alb.Alb("alb-private", {
* addressIpVersion: "IPv4",
* type: "private",
* loadBalancerName: "acc-test-alb-private",
* description: "acc-test",
* subnetIds: [
* subnetIpv61.id,
* subnetIpv62.id,
* ],
* projectName: "default",
* deleteProtection: "off",
* tags: [{
* key: "k1",
* value: "v1",
* }],
* });
* const alb_public = new volcengine.alb.Alb("alb-public", {
* addressIpVersion: "DualStack",
* type: "public",
* loadBalancerName: "acc-test-alb-public",
* description: "acc-test",
* subnetIds: [
* subnetIpv61.id,
* subnetIpv62.id,
* ],
* projectName: "default",
* deleteProtection: "off",
* eipBillingConfig: {
* isp: "BGP",
* eipBillingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* ipv6EipBillingConfig: {
* isp: "BGP",
* billingType: "PostPaidByBandwidth",
* bandwidth: 1,
* },
* tags: [{
* key: "k1",
* value: "v1",
* }],
* }, {
* dependsOn: [ipv6Gateway],
* });
* ```
*
* ## Import
*
* Alb can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:alb/alb:Alb default resource_id
* ```
*/
export declare class Alb extends pulumi.CustomResource {
/**
* Get an existing Alb 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?: AlbState, opts?: pulumi.CustomResourceOptions): Alb;
/**
* Returns true if the given object is an instance of Alb. 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 Alb;
/**
* The address ip version of the Alb. Valid values: `IPv4`, `DualStack`. Default is `ipv4`.
*/
readonly addressIpVersion: pulumi.Output<string | undefined>;
/**
* Whether to enable the delete protection function of the Alb. Valid values: `on`, `off`. Default is `off`.
*/
readonly deleteProtection: pulumi.Output<string | undefined>;
/**
* The description of the Alb.
*/
readonly description: pulumi.Output<string>;
/**
* The DNS name.
*/
readonly dnsName: pulumi.Output<string>;
/**
* The billing configuration of the EIP which automatically associated to the Alb. This field is valid when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.eip.Address` and `volcengine.eip.Associate` to achieve public network access function.
*/
readonly eipBillingConfig: pulumi.Output<outputs.alb.AlbEipBillingConfig>;
/**
* The billing configuration of the Ipv6 EIP which automatically associated to the Alb. This field is required when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.vpc.Ipv6Gateway` and `volcengine.vpc.Ipv6AddressBandwidth` to achieve ipv6 public network access function.
*/
readonly ipv6EipBillingConfig: pulumi.Output<outputs.alb.AlbIpv6EipBillingConfig>;
/**
* The name of the Alb.
*/
readonly loadBalancerName: pulumi.Output<string>;
/**
* The local addresses of the Alb.
*/
readonly localAddresses: pulumi.Output<string[]>;
/**
* The ProjectName of the Alb.
*/
readonly projectName: pulumi.Output<string>;
/**
* The status of the Alb.
*/
readonly status: pulumi.Output<string>;
/**
* The id of the Subnet.
*/
readonly subnetIds: pulumi.Output<string[]>;
/**
* Tags.
*/
readonly tags: pulumi.Output<outputs.alb.AlbTag[] | undefined>;
/**
* The type of the Alb. Valid values: `public`, `private`.
*/
readonly type: pulumi.Output<string>;
/**
* The vpc id of the Alb.
*/
readonly vpcId: pulumi.Output<string>;
/**
* Configuration information of the Alb instance in different Availability Zones.
*/
readonly zoneMappings: pulumi.Output<outputs.alb.AlbZoneMapping[]>;
/**
* Create a Alb 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: AlbArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Alb resources.
*/
export interface AlbState {
/**
* The address ip version of the Alb. Valid values: `IPv4`, `DualStack`. Default is `ipv4`.
*/
addressIpVersion?: pulumi.Input<string>;
/**
* Whether to enable the delete protection function of the Alb. Valid values: `on`, `off`. Default is `off`.
*/
deleteProtection?: pulumi.Input<string>;
/**
* The description of the Alb.
*/
description?: pulumi.Input<string>;
/**
* The DNS name.
*/
dnsName?: pulumi.Input<string>;
/**
* The billing configuration of the EIP which automatically associated to the Alb. This field is valid when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.eip.Address` and `volcengine.eip.Associate` to achieve public network access function.
*/
eipBillingConfig?: pulumi.Input<inputs.alb.AlbEipBillingConfig>;
/**
* The billing configuration of the Ipv6 EIP which automatically associated to the Alb. This field is required when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.vpc.Ipv6Gateway` and `volcengine.vpc.Ipv6AddressBandwidth` to achieve ipv6 public network access function.
*/
ipv6EipBillingConfig?: pulumi.Input<inputs.alb.AlbIpv6EipBillingConfig>;
/**
* The name of the Alb.
*/
loadBalancerName?: pulumi.Input<string>;
/**
* The local addresses of the Alb.
*/
localAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ProjectName of the Alb.
*/
projectName?: pulumi.Input<string>;
/**
* The status of the Alb.
*/
status?: pulumi.Input<string>;
/**
* The id of the Subnet.
*/
subnetIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.alb.AlbTag>[]>;
/**
* The type of the Alb. Valid values: `public`, `private`.
*/
type?: pulumi.Input<string>;
/**
* The vpc id of the Alb.
*/
vpcId?: pulumi.Input<string>;
/**
* Configuration information of the Alb instance in different Availability Zones.
*/
zoneMappings?: pulumi.Input<pulumi.Input<inputs.alb.AlbZoneMapping>[]>;
}
/**
* The set of arguments for constructing a Alb resource.
*/
export interface AlbArgs {
/**
* The address ip version of the Alb. Valid values: `IPv4`, `DualStack`. Default is `ipv4`.
*/
addressIpVersion?: pulumi.Input<string>;
/**
* Whether to enable the delete protection function of the Alb. Valid values: `on`, `off`. Default is `off`.
*/
deleteProtection?: pulumi.Input<string>;
/**
* The description of the Alb.
*/
description?: pulumi.Input<string>;
/**
* The billing configuration of the EIP which automatically associated to the Alb. This field is valid when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.eip.Address` and `volcengine.eip.Associate` to achieve public network access function.
*/
eipBillingConfig?: pulumi.Input<inputs.alb.AlbEipBillingConfig>;
/**
* The billing configuration of the Ipv6 EIP which automatically associated to the Alb. This field is required when the type of the Alb is `public`.When the type of the Alb is `private`, suggest using a combination of resource `volcengine.vpc.Ipv6Gateway` and `volcengine.vpc.Ipv6AddressBandwidth` to achieve ipv6 public network access function.
*/
ipv6EipBillingConfig?: pulumi.Input<inputs.alb.AlbIpv6EipBillingConfig>;
/**
* The name of the Alb.
*/
loadBalancerName?: pulumi.Input<string>;
/**
* The ProjectName of the Alb.
*/
projectName?: pulumi.Input<string>;
/**
* The id of the Subnet.
*/
subnetIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* Tags.
*/
tags?: pulumi.Input<pulumi.Input<inputs.alb.AlbTag>[]>;
/**
* The type of the Alb. Valid values: `public`, `private`.
*/
type: pulumi.Input<string>;
}