tencentcloud.ClbInstance
Explore with Pulumi AI
Provides a resource to create a CLB instance.
Example Usage
Create INTERNAL CLB
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create clb
const example = new tencentcloud.ClbInstance("example", {
networkType: "INTERNAL",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
is_multicast=False)
# create clb
example = tencentcloud.ClbInstance("example",
network_type="INTERNAL",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "example", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create clb
var example = new Tencentcloud.ClbInstance("example", new()
{
NetworkType = "INTERNAL",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create clb
var example = new ClbInstance("example", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create clb
example:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
tags:
tagKey: tagValue
Create CLB with eip_address_id, Only support INTERNAL CLB
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create clb
const example = new tencentcloud.ClbInstance("example", {
networkType: "INTERNAL",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
eipAddressId: "eip-lt0w6jhq",
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
is_multicast=False)
# create clb
example = tencentcloud.ClbInstance("example",
network_type="INTERNAL",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
eip_address_id="eip-lt0w6jhq",
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "example", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
EipAddressId: pulumi.String("eip-lt0w6jhq"),
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create clb
var example = new Tencentcloud.ClbInstance("example", new()
{
NetworkType = "INTERNAL",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
EipAddressId = "eip-lt0w6jhq",
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create clb
var example = new ClbInstance("example", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.eipAddressId("eip-lt0w6jhq")
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create clb
example:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
eipAddressId: eip-lt0w6jhq
tags:
tagKey: tagValue
Create dedicated cluster clb
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
cdcId: "cluster-lchwgxhs",
isMulticast: false,
});
// create clb
const example = new tencentcloud.ClbInstance("example", {
networkType: "INTERNAL",
clbName: "tf-example",
projectId: 0,
clusterId: "cluster-lchwgxhs",
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
cdc_id="cluster-lchwgxhs",
is_multicast=False)
# create clb
example = tencentcloud.ClbInstance("example",
network_type="INTERNAL",
clb_name="tf-example",
project_id=0,
cluster_id="cluster-lchwgxhs",
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
CdcId: pulumi.String("cluster-lchwgxhs"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "example", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
ClusterId: pulumi.String("cluster-lchwgxhs"),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
CdcId = "cluster-lchwgxhs",
IsMulticast = false,
});
// create clb
var example = new Tencentcloud.ClbInstance("example", new()
{
NetworkType = "INTERNAL",
ClbName = "tf-example",
ProjectId = 0,
ClusterId = "cluster-lchwgxhs",
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.cdcId("cluster-lchwgxhs")
.isMulticast(false)
.build());
// create clb
var example = new ClbInstance("example", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("tf-example")
.projectId(0)
.clusterId("cluster-lchwgxhs")
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
cdcId: cluster-lchwgxhs
isMulticast: false
# create clb
example:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: tf-example
projectId: 0
clusterId: cluster-lchwgxhs
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
tags:
tagKey: tagValue
Create LCU-supported CLB
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create clb
const example = new tencentcloud.ClbInstance("example", {
networkType: "INTERNAL",
clbName: "tf-example",
projectId: 0,
slaType: "clb.c3.medium",
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
is_multicast=False)
# create clb
example = tencentcloud.ClbInstance("example",
network_type="INTERNAL",
clb_name="tf-example",
project_id=0,
sla_type="clb.c3.medium",
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "example", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
SlaType: pulumi.String("clb.c3.medium"),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create clb
var example = new Tencentcloud.ClbInstance("example", new()
{
NetworkType = "INTERNAL",
ClbName = "tf-example",
ProjectId = 0,
SlaType = "clb.c3.medium",
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create clb
var example = new ClbInstance("example", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("tf-example")
.projectId(0)
.slaType("clb.c3.medium")
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create clb
example:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: tf-example
projectId: 0
slaType: clb.c3.medium
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
tags:
tagKey: tagValue
Create OPEN CLB
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
securityGroups: [exampleSecurityGroup.securityGroupId],
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
security_groups=[example_security_group.security_group_id],
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
tags:
tagKey: tagValue
Support CORS
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const zone = config.get("zone") || "ap-guangzhou";
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
securityGroups: [exampleSecurityGroup.securityGroupId],
targetRegionInfoRegion: zone,
targetRegionInfoVpcId: vpc.vpcId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
zone = config.get("zone")
if zone is None:
zone = "ap-guangzhou"
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
security_groups=[example_security_group.security_group_id],
target_region_info_region=zone,
target_region_info_vpc_id=vpc.vpc_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
zone := "ap-guangzhou"
if param := cfg.Get("zone"); param != "" {
zone = param
}
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
TargetRegionInfoRegion: pulumi.String(zone),
TargetRegionInfoVpcId: vpc.VpcId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var zone = config.Get("zone") ?? "ap-guangzhou";
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
TargetRegionInfoRegion = zone,
TargetRegionInfoVpcId = vpc.VpcId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var zone = config.get("zone").orElse("ap-guangzhou");
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.targetRegionInfoRegion(zone)
.targetRegionInfoVpcId(vpc.vpcId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
zone:
type: string
default: ap-guangzhou
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
targetRegionInfoRegion: ${zone}
targetRegionInfoVpcId: ${vpc.vpcId}
tags:
tagKey: tagValue
Open CLB with VipIsp
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create vpc bandwidth package
const exampleVpcBandwidthPackage = new tencentcloud.VpcBandwidthPackage("exampleVpcBandwidthPackage", {
networkType: "SINGLEISP_CMCC",
chargeType: "ENHANCED95_POSTPAID_BY_MONTH",
bandwidthPackageName: "tf-example",
internetMaxBandwidth: 300,
egress: "center_egress1",
tags: {
createdBy: "terraform",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
vipIsp: "CMCC",
internetChargeType: "BANDWIDTH_PACKAGE",
bandwidthPackageId: exampleVpcBandwidthPackage.vpcBandwidthPackageId,
vpcId: vpc.vpcId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create vpc bandwidth package
example_vpc_bandwidth_package = tencentcloud.VpcBandwidthPackage("exampleVpcBandwidthPackage",
network_type="SINGLEISP_CMCC",
charge_type="ENHANCED95_POSTPAID_BY_MONTH",
bandwidth_package_name="tf-example",
internet_max_bandwidth=300,
egress="center_egress1",
tags={
"createdBy": "terraform",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
vip_isp="CMCC",
internet_charge_type="BANDWIDTH_PACKAGE",
bandwidth_package_id=example_vpc_bandwidth_package.vpc_bandwidth_package_id,
vpc_id=vpc.vpc_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create vpc bandwidth package
exampleVpcBandwidthPackage, err := tencentcloud.NewVpcBandwidthPackage(ctx, "exampleVpcBandwidthPackage", &tencentcloud.VpcBandwidthPackageArgs{
NetworkType: pulumi.String("SINGLEISP_CMCC"),
ChargeType: pulumi.String("ENHANCED95_POSTPAID_BY_MONTH"),
BandwidthPackageName: pulumi.String("tf-example"),
InternetMaxBandwidth: pulumi.Float64(300),
Egress: pulumi.String("center_egress1"),
Tags: pulumi.StringMap{
"createdBy": pulumi.String("terraform"),
},
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VipIsp: pulumi.String("CMCC"),
InternetChargeType: pulumi.String("BANDWIDTH_PACKAGE"),
BandwidthPackageId: exampleVpcBandwidthPackage.VpcBandwidthPackageId,
VpcId: vpc.VpcId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create vpc bandwidth package
var exampleVpcBandwidthPackage = new Tencentcloud.VpcBandwidthPackage("exampleVpcBandwidthPackage", new()
{
NetworkType = "SINGLEISP_CMCC",
ChargeType = "ENHANCED95_POSTPAID_BY_MONTH",
BandwidthPackageName = "tf-example",
InternetMaxBandwidth = 300,
Egress = "center_egress1",
Tags =
{
{ "createdBy", "terraform" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
VipIsp = "CMCC",
InternetChargeType = "BANDWIDTH_PACKAGE",
BandwidthPackageId = exampleVpcBandwidthPackage.VpcBandwidthPackageId,
VpcId = vpc.VpcId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.VpcBandwidthPackage;
import com.pulumi.tencentcloud.VpcBandwidthPackageArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create vpc bandwidth package
var exampleVpcBandwidthPackage = new VpcBandwidthPackage("exampleVpcBandwidthPackage", VpcBandwidthPackageArgs.builder()
.networkType("SINGLEISP_CMCC")
.chargeType("ENHANCED95_POSTPAID_BY_MONTH")
.bandwidthPackageName("tf-example")
.internetMaxBandwidth(300)
.egress("center_egress1")
.tags(Map.of("createdBy", "terraform"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.vipIsp("CMCC")
.internetChargeType("BANDWIDTH_PACKAGE")
.bandwidthPackageId(exampleVpcBandwidthPackage.vpcBandwidthPackageId())
.vpcId(vpc.vpcId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create vpc bandwidth package
exampleVpcBandwidthPackage:
type: tencentcloud:VpcBandwidthPackage
properties:
networkType: SINGLEISP_CMCC
chargeType: ENHANCED95_POSTPAID_BY_MONTH
bandwidthPackageName: tf-example
internetMaxBandwidth: 300
egress: center_egress1
tags:
createdBy: terraform
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
vipIsp: CMCC
internetChargeType: BANDWIDTH_PACKAGE
bandwidthPackageId: ${exampleVpcBandwidthPackage.vpcBandwidthPackageId}
vpcId: ${vpc.vpcId}
tags:
tagKey: tagValue
Dynamic Vip Instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const zone = config.get("zone") || "ap-guangzhou";
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
targetRegionInfoRegion: zone,
targetRegionInfoVpcId: vpc.vpcId,
securityGroups: [exampleSecurityGroup.securityGroupId],
dynamicVip: true,
tags: {
tagKey: "tagValue",
},
});
export const domain = exampleClbInstance.domain;
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
zone = config.get("zone")
if zone is None:
zone = "ap-guangzhou"
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
is_multicast=False)
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
target_region_info_region=zone,
target_region_info_vpc_id=vpc.vpc_id,
security_groups=[example_security_group.security_group_id],
dynamic_vip=True,
tags={
"tagKey": "tagValue",
})
pulumi.export("domain", example_clb_instance.domain)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
zone := "ap-guangzhou"
if param := cfg.Get("zone"); param != "" {
zone = param
}
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
_, err = tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
// create clb
exampleClbInstance, err := tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
TargetRegionInfoRegion: pulumi.String(zone),
TargetRegionInfoVpcId: vpc.VpcId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
DynamicVip: pulumi.Bool(true),
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
ctx.Export("domain", exampleClbInstance.Domain)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var zone = config.Get("zone") ?? "ap-guangzhou";
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
TargetRegionInfoRegion = zone,
TargetRegionInfoVpcId = vpc.VpcId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
DynamicVip = true,
Tags =
{
{ "tagKey", "tagValue" },
},
});
return new Dictionary<string, object?>
{
["domain"] = exampleClbInstance.Domain,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var zone = config.get("zone").orElse("ap-guangzhou");
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.targetRegionInfoRegion(zone)
.targetRegionInfoVpcId(vpc.vpcId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.dynamicVip(true)
.tags(Map.of("tagKey", "tagValue"))
.build());
ctx.export("domain", exampleClbInstance.domain());
}
}
configuration:
zone:
type: string
default: ap-guangzhou
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
targetRegionInfoRegion: ${zone}
targetRegionInfoVpcId: ${vpc.vpcId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
dynamicVip: true
tags:
tagKey: tagValue
outputs:
domain: ${exampleClbInstance.domain}
Specified Vip Instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
vpcId: vpc.vpcId,
securityGroups: [exampleSecurityGroup.securityGroupId],
vip: "111.230.4.204",
tags: {
tagKey: "tagValue",
},
});
export const domain = exampleClbInstance.domain;
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
vpc_id=vpc.vpc_id,
security_groups=[example_security_group.security_group_id],
vip="111.230.4.204",
tags={
"tagKey": "tagValue",
})
pulumi.export("domain", example_clb_instance.domain)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
// create clb
exampleClbInstance, err := tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
VpcId: vpc.VpcId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
Vip: pulumi.String("111.230.4.204"),
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
ctx.Export("domain", exampleClbInstance.Domain)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
VpcId = vpc.VpcId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
Vip = "111.230.4.204",
Tags =
{
{ "tagKey", "tagValue" },
},
});
return new Dictionary<string, object?>
{
["domain"] = exampleClbInstance.Domain,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.vpcId(vpc.vpcId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.vip("111.230.4.204")
.tags(Map.of("tagKey", "tagValue"))
.build());
ctx.export("domain", exampleClbInstance.domain());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
vpcId: ${vpc.vpcId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
vip: 111.230.4.204
tags:
tagKey: tagValue
outputs:
domain: ${exampleClbInstance.domain}
Default enable
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const zone = config.get("zone") || "ap-guangzhou";
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: availabilityZone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "OPEN",
clbName: "tf-example",
projectId: 0,
loadBalancerPassToTarget: true,
vpcId: vpc.vpcId,
securityGroups: [exampleSecurityGroup.securityGroupId],
targetRegionInfoVpcId: vpc.vpcId,
targetRegionInfoRegion: zone,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
zone = config.get("zone")
if zone is None:
zone = "ap-guangzhou"
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=availability_zone,
cidr_block="10.0.1.0/24",
is_multicast=False)
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="OPEN",
clb_name="tf-example",
project_id=0,
load_balancer_pass_to_target=True,
vpc_id=vpc.vpc_id,
security_groups=[example_security_group.security_group_id],
target_region_info_vpc_id=vpc.vpc_id,
target_region_info_region=zone,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
zone := "ap-guangzhou"
if param := cfg.Get("zone"); param != "" {
zone = param
}
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
_, err = tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.String(availabilityZone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
LoadBalancerPassToTarget: pulumi.Bool(true),
VpcId: vpc.VpcId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
TargetRegionInfoVpcId: vpc.VpcId,
TargetRegionInfoRegion: pulumi.String(zone),
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var zone = config.Get("zone") ?? "ap-guangzhou";
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = availabilityZone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
ProjectId = 0,
LoadBalancerPassToTarget = true,
VpcId = vpc.VpcId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
TargetRegionInfoVpcId = vpc.VpcId,
TargetRegionInfoRegion = zone,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var zone = config.get("zone").orElse("ap-guangzhou");
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(availabilityZone)
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.projectId(0)
.loadBalancerPassToTarget(true)
.vpcId(vpc.vpcId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.targetRegionInfoVpcId(vpc.vpcId())
.targetRegionInfoRegion(zone)
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
configuration:
zone:
type: string
default: ap-guangzhou
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${availabilityZone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
projectId: 0
loadBalancerPassToTarget: true
vpcId: ${vpc.vpcId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
targetRegionInfoVpcId: ${vpc.vpcId}
targetRegionInfoRegion: ${zone}
tags:
tagKey: tagValue
Create multiple instance
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
const example = new tencentcloud.ClbInstance("example", {
networkType: "OPEN",
clbName: "tf-example",
masterZoneId: availabilityZone,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
availability_zone = "ap-guangzhou-4"
example = tencentcloud.ClbInstance("example",
network_type="OPEN",
clb_name="tf-example",
master_zone_id=availability_zone)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
availabilityZone := "ap-guangzhou-4"
if param := cfg.Get("availabilityZone"); param != "" {
availabilityZone = param
}
_, err := tencentcloud.NewClbInstance(ctx, "example", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("OPEN"),
ClbName: pulumi.String("tf-example"),
MasterZoneId: pulumi.String(availabilityZone),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
var example = new Tencentcloud.ClbInstance("example", new()
{
NetworkType = "OPEN",
ClbName = "tf-example",
MasterZoneId = availabilityZone,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
var example = new ClbInstance("example", ClbInstanceArgs.builder()
.networkType("OPEN")
.clbName("tf-example")
.masterZoneId(availabilityZone)
.build());
}
}
configuration:
availabilityZone:
type: string
default: ap-guangzhou-4
resources:
example:
type: tencentcloud:ClbInstance
properties:
networkType: OPEN
clbName: tf-example
masterZoneId: ${availabilityZone}
Create instance with log
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
availabilityZone: _var.availability_zone,
cidrBlock: "10.0.1.0/24",
isMulticast: false,
});
// create route table
const route = new tencentcloud.RouteTable("route", {vpcId: vpc.vpcId});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
description: "sg desc.",
projectId: 0,
tags: {
example: "test",
},
});
const log = new tencentcloud.ClbLogSet("log", {period: 7});
// create topic
const topic = new tencentcloud.ClbLogTopic("topic", {
logSetId: log.clbLogSetId,
topicName: "clb-topic",
});
// create clb
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "INTERNAL",
clbName: "tf-example",
projectId: 0,
loadBalancerPassToTarget: true,
vpcId: vpc.vpcId,
subnetId: subnet.subnetId,
securityGroups: [exampleSecurityGroup.securityGroupId],
logSetId: log.clbLogSetId,
logTopicId: topic.clbLogTopicId,
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
availability_zone=var["availability_zone"],
cidr_block="10.0.1.0/24",
is_multicast=False)
# create route table
route = tencentcloud.RouteTable("route", vpc_id=vpc.vpc_id)
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
description="sg desc.",
project_id=0,
tags={
"example": "test",
})
log = tencentcloud.ClbLogSet("log", period=7)
# create topic
topic = tencentcloud.ClbLogTopic("topic",
log_set_id=log.clb_log_set_id,
topic_name="clb-topic")
# create clb
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="INTERNAL",
clb_name="tf-example",
project_id=0,
load_balancer_pass_to_target=True,
vpc_id=vpc.vpc_id,
subnet_id=subnet.subnet_id,
security_groups=[example_security_group.security_group_id],
log_set_id=log.clb_log_set_id,
log_topic_id=topic.clb_log_topic_id,
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// create vpc
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
// create subnet
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
AvailabilityZone: pulumi.Any(_var.Availability_zone),
CidrBlock: pulumi.String("10.0.1.0/24"),
IsMulticast: pulumi.Bool(false),
})
if err != nil {
return err
}
// create route table
_, err = tencentcloud.NewRouteTable(ctx, "route", &tencentcloud.RouteTableArgs{
VpcId: vpc.VpcId,
})
if err != nil {
return err
}
// create security group
exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
Description: pulumi.String("sg desc."),
ProjectId: pulumi.Float64(0),
Tags: pulumi.StringMap{
"example": pulumi.String("test"),
},
})
if err != nil {
return err
}
log, err := tencentcloud.NewClbLogSet(ctx, "log", &tencentcloud.ClbLogSetArgs{
Period: pulumi.Float64(7),
})
if err != nil {
return err
}
// create topic
topic, err := tencentcloud.NewClbLogTopic(ctx, "topic", &tencentcloud.ClbLogTopicArgs{
LogSetId: log.ClbLogSetId,
TopicName: pulumi.String("clb-topic"),
})
if err != nil {
return err
}
// create clb
_, err = tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("tf-example"),
ProjectId: pulumi.Float64(0),
LoadBalancerPassToTarget: pulumi.Bool(true),
VpcId: vpc.VpcId,
SubnetId: subnet.SubnetId,
SecurityGroups: pulumi.StringArray{
exampleSecurityGroup.SecurityGroupId,
},
LogSetId: log.ClbLogSetId,
LogTopicId: topic.ClbLogTopicId,
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
// create vpc
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
// create subnet
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
AvailabilityZone = @var.Availability_zone,
CidrBlock = "10.0.1.0/24",
IsMulticast = false,
});
// create route table
var route = new Tencentcloud.RouteTable("route", new()
{
VpcId = vpc.VpcId,
});
// create security group
var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
{
Description = "sg desc.",
ProjectId = 0,
Tags =
{
{ "example", "test" },
},
});
var log = new Tencentcloud.ClbLogSet("log", new()
{
Period = 7,
});
// create topic
var topic = new Tencentcloud.ClbLogTopic("topic", new()
{
LogSetId = log.ClbLogSetId,
TopicName = "clb-topic",
});
// create clb
var exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "INTERNAL",
ClbName = "tf-example",
ProjectId = 0,
LoadBalancerPassToTarget = true,
VpcId = vpc.VpcId,
SubnetId = subnet.SubnetId,
SecurityGroups = new[]
{
exampleSecurityGroup.SecurityGroupId,
},
LogSetId = log.ClbLogSetId,
LogTopicId = topic.ClbLogTopicId,
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.RouteTable;
import com.pulumi.tencentcloud.RouteTableArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.ClbLogSet;
import com.pulumi.tencentcloud.ClbLogSetArgs;
import com.pulumi.tencentcloud.ClbLogTopic;
import com.pulumi.tencentcloud.ClbLogTopicArgs;
import com.pulumi.tencentcloud.ClbInstance;
import com.pulumi.tencentcloud.ClbInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// create vpc
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
// create subnet
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.availabilityZone(var_.availability_zone())
.cidrBlock("10.0.1.0/24")
.isMulticast(false)
.build());
// create route table
var route = new RouteTable("route", RouteTableArgs.builder()
.vpcId(vpc.vpcId())
.build());
// create security group
var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
.description("sg desc.")
.projectId(0)
.tags(Map.of("example", "test"))
.build());
var log = new ClbLogSet("log", ClbLogSetArgs.builder()
.period(7)
.build());
// create topic
var topic = new ClbLogTopic("topic", ClbLogTopicArgs.builder()
.logSetId(log.clbLogSetId())
.topicName("clb-topic")
.build());
// create clb
var exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("tf-example")
.projectId(0)
.loadBalancerPassToTarget(true)
.vpcId(vpc.vpcId())
.subnetId(subnet.subnetId())
.securityGroups(exampleSecurityGroup.securityGroupId())
.logSetId(log.clbLogSetId())
.logTopicId(topic.clbLogTopicId())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
# create vpc
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
# create subnet
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
availabilityZone: ${var.availability_zone}
cidrBlock: 10.0.1.0/24
isMulticast: false
# create route table
route:
type: tencentcloud:RouteTable
properties:
vpcId: ${vpc.vpcId}
# create security group
exampleSecurityGroup:
type: tencentcloud:SecurityGroup
properties:
description: sg desc.
projectId: 0
tags:
example: test
log:
type: tencentcloud:ClbLogSet
properties:
period: 7
# create topic
topic:
type: tencentcloud:ClbLogTopic
properties:
logSetId: ${log.clbLogSetId}
topicName: clb-topic
# create clb
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: tf-example
projectId: 0
loadBalancerPassToTarget: true
vpcId: ${vpc.vpcId}
subnetId: ${subnet.subnetId}
securityGroups:
- ${exampleSecurityGroup.securityGroupId}
logSetId: ${log.clbLogSetId}
logTopicId: ${topic.clbLogTopicId}
tags:
tagKey: tagValue
Create ClbInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClbInstance(name: string, args: ClbInstanceArgs, opts?: CustomResourceOptions);
@overload
def ClbInstance(resource_name: str,
args: ClbInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClbInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
clb_name: Optional[str] = None,
network_type: Optional[str] = None,
eip_address_id: Optional[str] = None,
vip_isp: Optional[str] = None,
cluster_id: Optional[str] = None,
delete_protect: Optional[bool] = None,
dynamic_vip: Optional[bool] = None,
address_ip_version: Optional[str] = None,
internet_bandwidth_max_out: Optional[float] = None,
internet_charge_type: Optional[str] = None,
load_balancer_pass_to_target: Optional[bool] = None,
log_set_id: Optional[str] = None,
log_topic_id: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
clb_instance_id: Optional[str] = None,
bandwidth_package_id: Optional[str] = None,
master_zone_id: Optional[str] = None,
sla_type: Optional[str] = None,
slave_zone_id: Optional[str] = None,
snat_ips: Optional[Sequence[ClbInstanceSnatIpArgs]] = None,
snat_pro: Optional[bool] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_region_info_region: Optional[str] = None,
target_region_info_vpc_id: Optional[str] = None,
vip: Optional[str] = None,
project_id: Optional[float] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = None)
func NewClbInstance(ctx *Context, name string, args ClbInstanceArgs, opts ...ResourceOption) (*ClbInstance, error)
public ClbInstance(string name, ClbInstanceArgs args, CustomResourceOptions? opts = null)
public ClbInstance(String name, ClbInstanceArgs args)
public ClbInstance(String name, ClbInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:ClbInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClbInstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClbInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClbInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClbInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ClbInstance resource accepts the following input properties:
- Clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- Network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - Address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - Bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - Clb
Instance stringId - ID of the resource.
- Cluster
Id string - Cluster ID.
- Delete
Protect bool - Whether to enable delete protection.
- Dynamic
Vip bool - If create dynamic vip CLB instance,
true
orfalse
. - Eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- Internet
Bandwidth doubleMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- Internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - Load
Balancer boolPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- Log
Set stringId - The id of log set.
- Log
Topic stringId - The id of log topic.
- Master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- Project
Id double - ID of the project within the CLB instance,
0
- Default Project. - Security
Groups List<string> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - Sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - Slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- Snat
Ips List<ClbInstance Snat Ip> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - Snat
Pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- Subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Dictionary<string, string>
- The available tags within this CLB.
- Target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- Vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - Vpc
Id string - VPC ID of the CLB.
- Zone
Id string - Available zone id, only applicable to open CLB.
- Clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- Network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - Address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - Bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - Clb
Instance stringId - ID of the resource.
- Cluster
Id string - Cluster ID.
- Delete
Protect bool - Whether to enable delete protection.
- Dynamic
Vip bool - If create dynamic vip CLB instance,
true
orfalse
. - Eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- Internet
Bandwidth float64Max Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- Internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - Load
Balancer boolPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- Log
Set stringId - The id of log set.
- Log
Topic stringId - The id of log topic.
- Master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- Project
Id float64 - ID of the project within the CLB instance,
0
- Default Project. - Security
Groups []string - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - Sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - Slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- Snat
Ips []ClbInstance Snat Ip Args - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - Snat
Pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- Subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - map[string]string
- The available tags within this CLB.
- Target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- Vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - Vpc
Id string - VPC ID of the CLB.
- Zone
Id string - Available zone id, only applicable to open CLB.
- clb
Name String - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- network
Type String - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - address
Ip StringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - bandwidth
Package StringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance StringId - ID of the resource.
- cluster
Id String - Cluster ID.
- delete
Protect Boolean - Whether to enable delete protection.
- dynamic
Vip Boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address StringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth DoubleMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge StringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - load
Balancer BooleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set StringId - The id of log set.
- log
Topic StringId - The id of log topic.
- master
Zone StringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- project
Id Double - ID of the project within the CLB instance,
0
- Default Project. - security
Groups List<String> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type String - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone StringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips List<ClbInstance Snat Ip> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro Boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id String - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Map<String,String>
- The available tags within this CLB.
- target
Region StringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region StringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip String
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp String - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id String - VPC ID of the CLB.
- zone
Id String - Available zone id, only applicable to open CLB.
- clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance stringId - ID of the resource.
- cluster
Id string - Cluster ID.
- delete
Protect boolean - Whether to enable delete protection.
- dynamic
Vip boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth numberMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - load
Balancer booleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set stringId - The id of log set.
- log
Topic stringId - The id of log topic.
- master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- project
Id number - ID of the project within the CLB instance,
0
- Default Project. - security
Groups string[] - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips ClbInstance Snat Ip[] - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - {[key: string]: string}
- The available tags within this CLB.
- target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id string - VPC ID of the CLB.
- zone
Id string - Available zone id, only applicable to open CLB.
- clb_
name str - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- network_
type str - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - address_
ip_ strversion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - bandwidth_
package_ strid - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb_
instance_ strid - ID of the resource.
- cluster_
id str - Cluster ID.
- delete_
protect bool - Whether to enable delete protection.
- dynamic_
vip bool - If create dynamic vip CLB instance,
true
orfalse
. - eip_
address_ strid - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet_
bandwidth_ floatmax_ out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet_
charge_ strtype - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - load_
balancer_ boolpass_ to_ target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log_
set_ strid - The id of log set.
- log_
topic_ strid - The id of log topic.
- master_
zone_ strid - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- project_
id float - ID of the project within the CLB instance,
0
- Default Project. - security_
groups Sequence[str] - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla_
type str - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave_
zone_ strid - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat_
ips Sequence[ClbInstance Snat Ip Args] - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat_
pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- subnet_
id str - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Mapping[str, str]
- The available tags within this CLB.
- target_
region_ strinfo_ region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target_
region_ strinfo_ vpc_ id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip str
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip_
isp str - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc_
id str - VPC ID of the CLB.
- zone_
id str - Available zone id, only applicable to open CLB.
- clb
Name String - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- network
Type String - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - address
Ip StringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - bandwidth
Package StringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance StringId - ID of the resource.
- cluster
Id String - Cluster ID.
- delete
Protect Boolean - Whether to enable delete protection.
- dynamic
Vip Boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address StringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth NumberMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge StringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - load
Balancer BooleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set StringId - The id of log set.
- log
Topic StringId - The id of log topic.
- master
Zone StringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- project
Id Number - ID of the project within the CLB instance,
0
- Default Project. - security
Groups List<String> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type String - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone StringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips List<Property Map> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro Boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id String - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Map<String>
- The available tags within this CLB.
- target
Region StringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region StringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip String
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp String - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id String - VPC ID of the CLB.
- zone
Id String - Available zone id, only applicable to open CLB.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClbInstance resource produces the following output properties:
- Address
Ipv6 string - The IPv6 address of the load balancing instance.
- Clb
Vips List<string> - The virtual service address table of the CLB.
- Domain string
- Domain name of the CLB instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
- Address
Ipv6 string - The IPv6 address of the load balancing instance.
- Clb
Vips []string - The virtual service address table of the CLB.
- Domain string
- Domain name of the CLB instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
- address
Ipv6 String - The IPv6 address of the load balancing instance.
- clb
Vips List<String> - The virtual service address table of the CLB.
- domain String
- Domain name of the CLB instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Mode String
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
- address
Ipv6 string - The IPv6 address of the load balancing instance.
- clb
Vips string[] - The virtual service address table of the CLB.
- domain string
- Domain name of the CLB instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
- address_
ipv6 str - The IPv6 address of the load balancing instance.
- clb_
vips Sequence[str] - The virtual service address table of the CLB.
- domain str
- Domain name of the CLB instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6_
mode str - This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
- address
Ipv6 String - The IPv6 address of the load balancing instance.
- clb
Vips List<String> - The virtual service address table of the CLB.
- domain String
- Domain name of the CLB instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6Mode String
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
.
Look up Existing ClbInstance Resource
Get an existing ClbInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClbInstanceState, opts?: CustomResourceOptions): ClbInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address_ip_version: Optional[str] = None,
address_ipv6: Optional[str] = None,
bandwidth_package_id: Optional[str] = None,
clb_instance_id: Optional[str] = None,
clb_name: Optional[str] = None,
clb_vips: Optional[Sequence[str]] = None,
cluster_id: Optional[str] = None,
delete_protect: Optional[bool] = None,
domain: Optional[str] = None,
dynamic_vip: Optional[bool] = None,
eip_address_id: Optional[str] = None,
internet_bandwidth_max_out: Optional[float] = None,
internet_charge_type: Optional[str] = None,
ipv6_mode: Optional[str] = None,
load_balancer_pass_to_target: Optional[bool] = None,
log_set_id: Optional[str] = None,
log_topic_id: Optional[str] = None,
master_zone_id: Optional[str] = None,
network_type: Optional[str] = None,
project_id: Optional[float] = None,
security_groups: Optional[Sequence[str]] = None,
sla_type: Optional[str] = None,
slave_zone_id: Optional[str] = None,
snat_ips: Optional[Sequence[ClbInstanceSnatIpArgs]] = None,
snat_pro: Optional[bool] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_region_info_region: Optional[str] = None,
target_region_info_vpc_id: Optional[str] = None,
vip: Optional[str] = None,
vip_isp: Optional[str] = None,
vpc_id: Optional[str] = None,
zone_id: Optional[str] = None) -> ClbInstance
func GetClbInstance(ctx *Context, name string, id IDInput, state *ClbInstanceState, opts ...ResourceOption) (*ClbInstance, error)
public static ClbInstance Get(string name, Input<string> id, ClbInstanceState? state, CustomResourceOptions? opts = null)
public static ClbInstance get(String name, Output<String> id, ClbInstanceState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClbInstance get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - Address
Ipv6 string - The IPv6 address of the load balancing instance.
- Bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - Clb
Instance stringId - ID of the resource.
- Clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- Clb
Vips List<string> - The virtual service address table of the CLB.
- Cluster
Id string - Cluster ID.
- Delete
Protect bool - Whether to enable delete protection.
- Domain string
- Domain name of the CLB instance.
- Dynamic
Vip bool - If create dynamic vip CLB instance,
true
orfalse
. - Eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- Internet
Bandwidth doubleMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- Internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - Ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - Load
Balancer boolPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- Log
Set stringId - The id of log set.
- Log
Topic stringId - The id of log topic.
- Master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- Network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - Project
Id double - ID of the project within the CLB instance,
0
- Default Project. - Security
Groups List<string> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - Sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - Slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- Snat
Ips List<ClbInstance Snat Ip> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - Snat
Pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- Subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Dictionary<string, string>
- The available tags within this CLB.
- Target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- Vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - Vpc
Id string - VPC ID of the CLB.
- Zone
Id string - Available zone id, only applicable to open CLB.
- Address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - Address
Ipv6 string - The IPv6 address of the load balancing instance.
- Bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - Clb
Instance stringId - ID of the resource.
- Clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- Clb
Vips []string - The virtual service address table of the CLB.
- Cluster
Id string - Cluster ID.
- Delete
Protect bool - Whether to enable delete protection.
- Domain string
- Domain name of the CLB instance.
- Dynamic
Vip bool - If create dynamic vip CLB instance,
true
orfalse
. - Eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- Internet
Bandwidth float64Max Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- Internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - Ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - Load
Balancer boolPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- Log
Set stringId - The id of log set.
- Log
Topic stringId - The id of log topic.
- Master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- Network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - Project
Id float64 - ID of the project within the CLB instance,
0
- Default Project. - Security
Groups []string - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - Sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - Slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- Snat
Ips []ClbInstance Snat Ip Args - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - Snat
Pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- Subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - map[string]string
- The available tags within this CLB.
- Target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - Vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- Vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - Vpc
Id string - VPC ID of the CLB.
- Zone
Id string - Available zone id, only applicable to open CLB.
- address
Ip StringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - address
Ipv6 String - The IPv6 address of the load balancing instance.
- bandwidth
Package StringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance StringId - ID of the resource.
- clb
Name String - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- clb
Vips List<String> - The virtual service address table of the CLB.
- cluster
Id String - Cluster ID.
- delete
Protect Boolean - Whether to enable delete protection.
- domain String
- Domain name of the CLB instance.
- dynamic
Vip Boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address StringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth DoubleMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge StringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - ipv6Mode String
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - load
Balancer BooleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set StringId - The id of log set.
- log
Topic StringId - The id of log topic.
- master
Zone StringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- network
Type String - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - project
Id Double - ID of the project within the CLB instance,
0
- Default Project. - security
Groups List<String> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type String - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone StringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips List<ClbInstance Snat Ip> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro Boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id String - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Map<String,String>
- The available tags within this CLB.
- target
Region StringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region StringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip String
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp String - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id String - VPC ID of the CLB.
- zone
Id String - Available zone id, only applicable to open CLB.
- address
Ip stringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - address
Ipv6 string - The IPv6 address of the load balancing instance.
- bandwidth
Package stringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance stringId - ID of the resource.
- clb
Name string - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- clb
Vips string[] - The virtual service address table of the CLB.
- cluster
Id string - Cluster ID.
- delete
Protect boolean - Whether to enable delete protection.
- domain string
- Domain name of the CLB instance.
- dynamic
Vip boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address stringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth numberMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge stringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - ipv6Mode string
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - load
Balancer booleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set stringId - The id of log set.
- log
Topic stringId - The id of log topic.
- master
Zone stringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- network
Type string - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - project
Id number - ID of the project within the CLB instance,
0
- Default Project. - security
Groups string[] - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type string - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone stringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips ClbInstance Snat Ip[] - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id string - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - {[key: string]: string}
- The available tags within this CLB.
- target
Region stringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region stringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip string
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp string - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id string - VPC ID of the CLB.
- zone
Id string - Available zone id, only applicable to open CLB.
- address_
ip_ strversion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - address_
ipv6 str - The IPv6 address of the load balancing instance.
- bandwidth_
package_ strid - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb_
instance_ strid - ID of the resource.
- clb_
name str - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- clb_
vips Sequence[str] - The virtual service address table of the CLB.
- cluster_
id str - Cluster ID.
- delete_
protect bool - Whether to enable delete protection.
- domain str
- Domain name of the CLB instance.
- dynamic_
vip bool - If create dynamic vip CLB instance,
true
orfalse
. - eip_
address_ strid - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet_
bandwidth_ floatmax_ out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet_
charge_ strtype - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - ipv6_
mode str - This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - load_
balancer_ boolpass_ to_ target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log_
set_ strid - The id of log set.
- log_
topic_ strid - The id of log topic.
- master_
zone_ strid - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- network_
type str - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - project_
id float - ID of the project within the CLB instance,
0
- Default Project. - security_
groups Sequence[str] - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla_
type str - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave_
zone_ strid - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat_
ips Sequence[ClbInstance Snat Ip Args] - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat_
pro bool - Indicates whether Binding IPs of other VPCs feature switch.
- subnet_
id str - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Mapping[str, str]
- The available tags within this CLB.
- target_
region_ strinfo_ region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target_
region_ strinfo_ vpc_ id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip str
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip_
isp str - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc_
id str - VPC ID of the CLB.
- zone_
id str - Available zone id, only applicable to open CLB.
- address
Ip StringVersion - It's only applicable to public network CLB instances. IP version. Values:
IPV4
,IPV6
andIPv6FullChain
(case-insensitive). Default:IPV4
. Note: IPV6 indicates IPv6 NAT64, while IPv6FullChain indicates IPv6. - address
Ipv6 String - The IPv6 address of the load balancing instance.
- bandwidth
Package StringId - Bandwidth package id. If set, the
internet_charge_type
must beBANDWIDTH_PACKAGE
. - clb
Instance StringId - ID of the resource.
- clb
Name String - Name of the CLB. The name can only contain Chinese characters, English letters, numbers, underscore and hyphen '-'.
- clb
Vips List<String> - The virtual service address table of the CLB.
- cluster
Id String - Cluster ID.
- delete
Protect Boolean - Whether to enable delete protection.
- domain String
- Domain name of the CLB instance.
- dynamic
Vip Boolean - If create dynamic vip CLB instance,
true
orfalse
. - eip
Address StringId - The unique ID of the EIP, such as eip-1v2rmbwk, is only applicable to the intranet load balancing binding EIP. During the EIP change, there may be a brief network interruption.
- internet
Bandwidth NumberMax Out - Max bandwidth out, only applicable to open CLB. Valid value ranges is [1, 2048]. Unit is Mbps.
- internet
Charge StringType - Internet charge type, only applicable to open CLB. Valid values are
TRAFFIC_POSTPAID_BY_HOUR
,BANDWIDTH_POSTPAID_BY_HOUR
andBANDWIDTH_PACKAGE
. - ipv6Mode String
- This field is meaningful when the IP address version is ipv6,
IPv6Nat64
|IPv6FullChain
. - load
Balancer BooleanPass To Target - Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.
- log
Set StringId - The id of log set.
- log
Topic StringId - The id of log topic.
- master
Zone StringId - Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.
- network
Type String - Type of CLB instance. Valid values:
OPEN
andINTERNAL
. - project
Id Number - ID of the project within the CLB instance,
0
- Default Project. - security
Groups List<String> - Security groups of the CLB instance. Supports both
OPEN
andINTERNAL
CLBs. - sla
Type String - This parameter is required to create LCU-supported instances. Values:
SLA
: Super Large 4. When you have activated Super Large models,SLA
refers to Super Large 4;clb.c2.medium
: Standard;clb.c3.small
: Advanced 1;clb.c3.medium
: Advanced 1;clb.c4.small
: Super Large 1;clb.c4.medium
: Super Large 2;clb.c4.large
: Super Large 3;clb.c4.xlarge
: Super Large 4. For more details, see Instance Specifications. - slave
Zone StringId - Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down.
- snat
Ips List<Property Map> - Snat Ip List, required with
snat_pro=true
. NOTE: This argument cannot be read and modified here because dynamic ip is untraceable, please import resourcetencentcloud.ClbSnatIp
to handle fixed ips. - snat
Pro Boolean - Indicates whether Binding IPs of other VPCs feature switch.
- subnet
Id String - In the case of purchasing a
INTERNAL
clb instance, the subnet id must be specified. The VIP of theINTERNAL
clb instance will be generated from this subnet. - Map<String>
- The available tags within this CLB.
- target
Region StringInfo Region - Region information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - target
Region StringInfo Vpc Id - Vpc information of backend services are attached the CLB instance. Only supports
OPEN
CLBs. - vip String
- Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not.
- vip
Isp String - Network operator, only applicable to open CLB. Valid values are
CMCC
(China Mobile),CTCC
(Telecom),CUCC
(China Unicom) andBGP
. If this ISP is specified, network billing method can only use the bandwidth package billing (BANDWIDTH_PACKAGE). - vpc
Id String - VPC ID of the CLB.
- zone
Id String - Available zone id, only applicable to open CLB.
Supporting Types
ClbInstanceSnatIp, ClbInstanceSnatIpArgs
Import
CLB instance can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clbInstance:ClbInstance example lb-7a0t6zqb
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.