flexibleengine.LbLoadbalancerV3
Explore with Pulumi AI
Manages a Dedicated Load Balancer resource within FlexibleEngine.
Example Usage
Basic Loadbalancer
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const l7Flavors = flexibleengine.getElbFlavors({
type: "L7",
});
const l4Flavors = flexibleengine.getElbFlavors({
type: "L4",
});
const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
cidr: "192.168.0.0/24",
gatewayIp: "192.168.0.1",
vpcId: exampleVpc.vpcV1Id,
});
const basic = new flexibleengine.LbLoadbalancerV3("basic", {
description: "basic example",
crossVpcBackend: true,
vpcId: exampleVpc.vpcV1Id,
ipv4SubnetId: exampleSubnet.ipv4SubnetId,
l4FlavorId: l4Flavors.then(l4Flavors => l4Flavors.ids?.[0]),
l7FlavorId: l7Flavors.then(l7Flavors => l7Flavors.ids?.[0]),
availabilityZones: [
"eu-west-0a",
"eu-west-0b",
],
});
import pulumi
import pulumi_flexibleengine as flexibleengine
l7_flavors = flexibleengine.get_elb_flavors(type="L7")
l4_flavors = flexibleengine.get_elb_flavors(type="L4")
example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
cidr="192.168.0.0/24",
gateway_ip="192.168.0.1",
vpc_id=example_vpc.vpc_v1_id)
basic = flexibleengine.LbLoadbalancerV3("basic",
description="basic example",
cross_vpc_backend=True,
vpc_id=example_vpc.vpc_v1_id,
ipv4_subnet_id=example_subnet.ipv4_subnet_id,
l4_flavor_id=l4_flavors.ids[0],
l7_flavor_id=l7_flavors.ids[0],
availability_zones=[
"eu-west-0a",
"eu-west-0b",
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
l7Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L7"),
}, nil)
if err != nil {
return err
}
l4Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L4"),
}, nil)
if err != nil {
return err
}
exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
Cidr: pulumi.String("192.168.0.0/24"),
GatewayIp: pulumi.String("192.168.0.1"),
VpcId: exampleVpc.VpcV1Id,
})
if err != nil {
return err
}
_, err = flexibleengine.NewLbLoadbalancerV3(ctx, "basic", &flexibleengine.LbLoadbalancerV3Args{
Description: pulumi.String("basic example"),
CrossVpcBackend: pulumi.Bool(true),
VpcId: exampleVpc.VpcV1Id,
Ipv4SubnetId: exampleSubnet.Ipv4SubnetId,
L4FlavorId: pulumi.String(l4Flavors.Ids[0]),
L7FlavorId: pulumi.String(l7Flavors.Ids[0]),
AvailabilityZones: pulumi.StringArray{
pulumi.String("eu-west-0a"),
pulumi.String("eu-west-0b"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var l7Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L7",
});
var l4Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L4",
});
var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
{
Cidr = "192.168.0.0/16",
});
var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
{
Cidr = "192.168.0.0/24",
GatewayIp = "192.168.0.1",
VpcId = exampleVpc.VpcV1Id,
});
var basic = new Flexibleengine.LbLoadbalancerV3("basic", new()
{
Description = "basic example",
CrossVpcBackend = true,
VpcId = exampleVpc.VpcV1Id,
Ipv4SubnetId = exampleSubnet.Ipv4SubnetId,
L4FlavorId = l4Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
L7FlavorId = l7Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
AvailabilityZones = new[]
{
"eu-west-0a",
"eu-west-0b",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetElbFlavorsArgs;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.VpcSubnetV1;
import com.pulumi.flexibleengine.VpcSubnetV1Args;
import com.pulumi.flexibleengine.LbLoadbalancerV3;
import com.pulumi.flexibleengine.LbLoadbalancerV3Args;
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 l7Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L7")
.build());
final var l4Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L4")
.build());
var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
.cidr("192.168.0.0/16")
.build());
var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
.cidr("192.168.0.0/24")
.gatewayIp("192.168.0.1")
.vpcId(exampleVpc.vpcV1Id())
.build());
var basic = new LbLoadbalancerV3("basic", LbLoadbalancerV3Args.builder()
.description("basic example")
.crossVpcBackend(true)
.vpcId(exampleVpc.vpcV1Id())
.ipv4SubnetId(exampleSubnet.ipv4SubnetId())
.l4FlavorId(l4Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.l7FlavorId(l7Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.availabilityZones(
"eu-west-0a",
"eu-west-0b")
.build());
}
}
resources:
exampleVpc:
type: flexibleengine:VpcV1
properties:
cidr: 192.168.0.0/16
exampleSubnet:
type: flexibleengine:VpcSubnetV1
properties:
cidr: 192.168.0.0/24
gatewayIp: 192.168.0.1
vpcId: ${exampleVpc.vpcV1Id}
basic:
type: flexibleengine:LbLoadbalancerV3
properties:
description: basic example
crossVpcBackend: true
vpcId: ${exampleVpc.vpcV1Id}
ipv4SubnetId: ${exampleSubnet.ipv4SubnetId}
l4FlavorId: ${l4Flavors.ids[0]}
l7FlavorId: ${l7Flavors.ids[0]}
availabilityZones:
- eu-west-0a
- eu-west-0b
variables:
l7Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L7
l4Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L4
Loadbalancer With Existing EIP
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const l7Flavors = flexibleengine.getElbFlavors({
type: "L7",
});
const l4Flavors = flexibleengine.getElbFlavors({
type: "L4",
});
const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
cidr: "192.168.0.0/24",
gatewayIp: "192.168.0.1",
vpcId: exampleVpc.vpcV1Id,
});
const basic = new flexibleengine.LbLoadbalancerV3("basic", {
description: "basic example",
crossVpcBackend: true,
vpcId: exampleVpc.vpcV1Id,
ipv6NetworkId: flexibleengine_vpc_subnet_v1.example_subnet_ipv6.id,
ipv6BandwidthId: "{{ ipv6_bandwidth_id }}",
ipv4SubnetId: exampleSubnet.ipv4SubnetId,
l4FlavorId: l4Flavors.then(l4Flavors => l4Flavors.ids?.[0]),
l7FlavorId: l7Flavors.then(l7Flavors => l7Flavors.ids?.[0]),
availabilityZones: [
"eu-west-0a",
"eu-west-0b",
],
ipv4EipId: flexibleengine_vpc_eip.example_eip.id,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
l7_flavors = flexibleengine.get_elb_flavors(type="L7")
l4_flavors = flexibleengine.get_elb_flavors(type="L4")
example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
cidr="192.168.0.0/24",
gateway_ip="192.168.0.1",
vpc_id=example_vpc.vpc_v1_id)
basic = flexibleengine.LbLoadbalancerV3("basic",
description="basic example",
cross_vpc_backend=True,
vpc_id=example_vpc.vpc_v1_id,
ipv6_network_id=flexibleengine_vpc_subnet_v1["example_subnet_ipv6"]["id"],
ipv6_bandwidth_id="{{ ipv6_bandwidth_id }}",
ipv4_subnet_id=example_subnet.ipv4_subnet_id,
l4_flavor_id=l4_flavors.ids[0],
l7_flavor_id=l7_flavors.ids[0],
availability_zones=[
"eu-west-0a",
"eu-west-0b",
],
ipv4_eip_id=flexibleengine_vpc_eip["example_eip"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
l7Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L7"),
}, nil)
if err != nil {
return err
}
l4Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L4"),
}, nil)
if err != nil {
return err
}
exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
Cidr: pulumi.String("192.168.0.0/24"),
GatewayIp: pulumi.String("192.168.0.1"),
VpcId: exampleVpc.VpcV1Id,
})
if err != nil {
return err
}
_, err = flexibleengine.NewLbLoadbalancerV3(ctx, "basic", &flexibleengine.LbLoadbalancerV3Args{
Description: pulumi.String("basic example"),
CrossVpcBackend: pulumi.Bool(true),
VpcId: exampleVpc.VpcV1Id,
Ipv6NetworkId: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet_ipv6.Id),
Ipv6BandwidthId: pulumi.String("{{ ipv6_bandwidth_id }}"),
Ipv4SubnetId: exampleSubnet.Ipv4SubnetId,
L4FlavorId: pulumi.String(l4Flavors.Ids[0]),
L7FlavorId: pulumi.String(l7Flavors.Ids[0]),
AvailabilityZones: pulumi.StringArray{
pulumi.String("eu-west-0a"),
pulumi.String("eu-west-0b"),
},
Ipv4EipId: pulumi.Any(flexibleengine_vpc_eip.Example_eip.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var l7Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L7",
});
var l4Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L4",
});
var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
{
Cidr = "192.168.0.0/16",
});
var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
{
Cidr = "192.168.0.0/24",
GatewayIp = "192.168.0.1",
VpcId = exampleVpc.VpcV1Id,
});
var basic = new Flexibleengine.LbLoadbalancerV3("basic", new()
{
Description = "basic example",
CrossVpcBackend = true,
VpcId = exampleVpc.VpcV1Id,
Ipv6NetworkId = flexibleengine_vpc_subnet_v1.Example_subnet_ipv6.Id,
Ipv6BandwidthId = "{{ ipv6_bandwidth_id }}",
Ipv4SubnetId = exampleSubnet.Ipv4SubnetId,
L4FlavorId = l4Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
L7FlavorId = l7Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
AvailabilityZones = new[]
{
"eu-west-0a",
"eu-west-0b",
},
Ipv4EipId = flexibleengine_vpc_eip.Example_eip.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetElbFlavorsArgs;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.VpcSubnetV1;
import com.pulumi.flexibleengine.VpcSubnetV1Args;
import com.pulumi.flexibleengine.LbLoadbalancerV3;
import com.pulumi.flexibleengine.LbLoadbalancerV3Args;
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 l7Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L7")
.build());
final var l4Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L4")
.build());
var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
.cidr("192.168.0.0/16")
.build());
var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
.cidr("192.168.0.0/24")
.gatewayIp("192.168.0.1")
.vpcId(exampleVpc.vpcV1Id())
.build());
var basic = new LbLoadbalancerV3("basic", LbLoadbalancerV3Args.builder()
.description("basic example")
.crossVpcBackend(true)
.vpcId(exampleVpc.vpcV1Id())
.ipv6NetworkId(flexibleengine_vpc_subnet_v1.example_subnet_ipv6().id())
.ipv6BandwidthId("{{ ipv6_bandwidth_id }}")
.ipv4SubnetId(exampleSubnet.ipv4SubnetId())
.l4FlavorId(l4Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.l7FlavorId(l7Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.availabilityZones(
"eu-west-0a",
"eu-west-0b")
.ipv4EipId(flexibleengine_vpc_eip.example_eip().id())
.build());
}
}
resources:
exampleVpc:
type: flexibleengine:VpcV1
properties:
cidr: 192.168.0.0/16
exampleSubnet:
type: flexibleengine:VpcSubnetV1
properties:
cidr: 192.168.0.0/24
gatewayIp: 192.168.0.1
vpcId: ${exampleVpc.vpcV1Id}
basic:
type: flexibleengine:LbLoadbalancerV3
properties:
description: basic example
crossVpcBackend: true
vpcId: ${exampleVpc.vpcV1Id}
ipv6NetworkId: ${flexibleengine_vpc_subnet_v1.example_subnet_ipv6.id}
ipv6BandwidthId: '{{ ipv6_bandwidth_id }}'
ipv4SubnetId: ${exampleSubnet.ipv4SubnetId}
l4FlavorId: ${l4Flavors.ids[0]}
l7FlavorId: ${l7Flavors.ids[0]}
availabilityZones:
- eu-west-0a
- eu-west-0b
ipv4EipId: ${flexibleengine_vpc_eip.example_eip.id}
variables:
l7Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L7
l4Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L4
Loadbalancer With EIP
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const l7Flavors = flexibleengine.getElbFlavors({
type: "L7",
});
const l4Flavors = flexibleengine.getElbFlavors({
type: "L4",
});
const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
cidr: "192.168.0.0/24",
gatewayIp: "192.168.0.1",
vpcId: exampleVpc.vpcV1Id,
});
const basic = new flexibleengine.LbLoadbalancerV3("basic", {
description: "basic example",
crossVpcBackend: true,
vpcId: exampleVpc.vpcV1Id,
ipv6NetworkId: flexibleengine_vpc_subnet_v1.example_subnet_ipv6.id,
ipv6BandwidthId: "{{ ipv6_bandwidth_id }}",
ipv4SubnetId: exampleSubnet.ipv4SubnetId,
l4FlavorId: l4Flavors.then(l4Flavors => l4Flavors.ids?.[0]),
l7FlavorId: l7Flavors.then(l7Flavors => l7Flavors.ids?.[0]),
availabilityZones: [
"eu-west-0a",
"eu-west-0b",
],
iptype: "5_bgp",
bandwidthChargeMode: "traffic",
sharetype: "PER",
bandwidthSize: 10,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
l7_flavors = flexibleengine.get_elb_flavors(type="L7")
l4_flavors = flexibleengine.get_elb_flavors(type="L4")
example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
cidr="192.168.0.0/24",
gateway_ip="192.168.0.1",
vpc_id=example_vpc.vpc_v1_id)
basic = flexibleengine.LbLoadbalancerV3("basic",
description="basic example",
cross_vpc_backend=True,
vpc_id=example_vpc.vpc_v1_id,
ipv6_network_id=flexibleengine_vpc_subnet_v1["example_subnet_ipv6"]["id"],
ipv6_bandwidth_id="{{ ipv6_bandwidth_id }}",
ipv4_subnet_id=example_subnet.ipv4_subnet_id,
l4_flavor_id=l4_flavors.ids[0],
l7_flavor_id=l7_flavors.ids[0],
availability_zones=[
"eu-west-0a",
"eu-west-0b",
],
iptype="5_bgp",
bandwidth_charge_mode="traffic",
sharetype="PER",
bandwidth_size=10)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
l7Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L7"),
}, nil)
if err != nil {
return err
}
l4Flavors, err := flexibleengine.GetElbFlavors(ctx, &flexibleengine.GetElbFlavorsArgs{
Type: pulumi.StringRef("L4"),
}, nil)
if err != nil {
return err
}
exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
Cidr: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
Cidr: pulumi.String("192.168.0.0/24"),
GatewayIp: pulumi.String("192.168.0.1"),
VpcId: exampleVpc.VpcV1Id,
})
if err != nil {
return err
}
_, err = flexibleengine.NewLbLoadbalancerV3(ctx, "basic", &flexibleengine.LbLoadbalancerV3Args{
Description: pulumi.String("basic example"),
CrossVpcBackend: pulumi.Bool(true),
VpcId: exampleVpc.VpcV1Id,
Ipv6NetworkId: pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet_ipv6.Id),
Ipv6BandwidthId: pulumi.String("{{ ipv6_bandwidth_id }}"),
Ipv4SubnetId: exampleSubnet.Ipv4SubnetId,
L4FlavorId: pulumi.String(l4Flavors.Ids[0]),
L7FlavorId: pulumi.String(l7Flavors.Ids[0]),
AvailabilityZones: pulumi.StringArray{
pulumi.String("eu-west-0a"),
pulumi.String("eu-west-0b"),
},
Iptype: pulumi.String("5_bgp"),
BandwidthChargeMode: pulumi.String("traffic"),
Sharetype: pulumi.String("PER"),
BandwidthSize: pulumi.Float64(10),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var l7Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L7",
});
var l4Flavors = Flexibleengine.GetElbFlavors.Invoke(new()
{
Type = "L4",
});
var exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
{
Cidr = "192.168.0.0/16",
});
var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
{
Cidr = "192.168.0.0/24",
GatewayIp = "192.168.0.1",
VpcId = exampleVpc.VpcV1Id,
});
var basic = new Flexibleengine.LbLoadbalancerV3("basic", new()
{
Description = "basic example",
CrossVpcBackend = true,
VpcId = exampleVpc.VpcV1Id,
Ipv6NetworkId = flexibleengine_vpc_subnet_v1.Example_subnet_ipv6.Id,
Ipv6BandwidthId = "{{ ipv6_bandwidth_id }}",
Ipv4SubnetId = exampleSubnet.Ipv4SubnetId,
L4FlavorId = l4Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
L7FlavorId = l7Flavors.Apply(getElbFlavorsResult => getElbFlavorsResult.Ids[0]),
AvailabilityZones = new[]
{
"eu-west-0a",
"eu-west-0b",
},
Iptype = "5_bgp",
BandwidthChargeMode = "traffic",
Sharetype = "PER",
BandwidthSize = 10,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.FlexibleengineFunctions;
import com.pulumi.flexibleengine.inputs.GetElbFlavorsArgs;
import com.pulumi.flexibleengine.VpcV1;
import com.pulumi.flexibleengine.VpcV1Args;
import com.pulumi.flexibleengine.VpcSubnetV1;
import com.pulumi.flexibleengine.VpcSubnetV1Args;
import com.pulumi.flexibleengine.LbLoadbalancerV3;
import com.pulumi.flexibleengine.LbLoadbalancerV3Args;
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 l7Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L7")
.build());
final var l4Flavors = FlexibleengineFunctions.getElbFlavors(GetElbFlavorsArgs.builder()
.type("L4")
.build());
var exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
.cidr("192.168.0.0/16")
.build());
var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
.cidr("192.168.0.0/24")
.gatewayIp("192.168.0.1")
.vpcId(exampleVpc.vpcV1Id())
.build());
var basic = new LbLoadbalancerV3("basic", LbLoadbalancerV3Args.builder()
.description("basic example")
.crossVpcBackend(true)
.vpcId(exampleVpc.vpcV1Id())
.ipv6NetworkId(flexibleengine_vpc_subnet_v1.example_subnet_ipv6().id())
.ipv6BandwidthId("{{ ipv6_bandwidth_id }}")
.ipv4SubnetId(exampleSubnet.ipv4SubnetId())
.l4FlavorId(l4Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.l7FlavorId(l7Flavors.applyValue(getElbFlavorsResult -> getElbFlavorsResult.ids()[0]))
.availabilityZones(
"eu-west-0a",
"eu-west-0b")
.iptype("5_bgp")
.bandwidthChargeMode("traffic")
.sharetype("PER")
.bandwidthSize(10)
.build());
}
}
resources:
exampleVpc:
type: flexibleengine:VpcV1
properties:
cidr: 192.168.0.0/16
exampleSubnet:
type: flexibleengine:VpcSubnetV1
properties:
cidr: 192.168.0.0/24
gatewayIp: 192.168.0.1
vpcId: ${exampleVpc.vpcV1Id}
basic:
type: flexibleengine:LbLoadbalancerV3
properties:
description: basic example
crossVpcBackend: true
vpcId: ${exampleVpc.vpcV1Id}
ipv6NetworkId: ${flexibleengine_vpc_subnet_v1.example_subnet_ipv6.id}
ipv6BandwidthId: '{{ ipv6_bandwidth_id }}'
ipv4SubnetId: ${exampleSubnet.ipv4SubnetId}
l4FlavorId: ${l4Flavors.ids[0]}
l7FlavorId: ${l7Flavors.ids[0]}
availabilityZones:
- eu-west-0a
- eu-west-0b
iptype: 5_bgp
bandwidthChargeMode: traffic
sharetype: PER
bandwidthSize: 10
variables:
l7Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L7
l4Flavors:
fn::invoke:
function: flexibleengine:getElbFlavors
arguments:
type: L4
Create LbLoadbalancerV3 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbLoadbalancerV3(name: string, args: LbLoadbalancerV3Args, opts?: CustomResourceOptions);
@overload
def LbLoadbalancerV3(resource_name: str,
args: LbLoadbalancerV3Args,
opts: Optional[ResourceOptions] = None)
@overload
def LbLoadbalancerV3(resource_name: str,
opts: Optional[ResourceOptions] = None,
availability_zones: Optional[Sequence[str]] = None,
ipv4_subnet_id: Optional[str] = None,
ipv6_network_id: Optional[str] = None,
auto_renew: Optional[str] = None,
backend_subnets: Optional[Sequence[str]] = None,
bandwidth_charge_mode: Optional[str] = None,
bandwidth_id: Optional[str] = None,
bandwidth_size: Optional[float] = None,
charging_mode: Optional[str] = None,
ipv6_bandwidth_id: Optional[str] = None,
description: Optional[str] = None,
enterprise_project_id: Optional[str] = None,
force_delete: Optional[bool] = None,
iptype: Optional[str] = None,
ipv4_address: Optional[str] = None,
autoscaling_enabled: Optional[bool] = None,
ipv4_eip_id: Optional[str] = None,
cross_vpc_backend: Optional[bool] = None,
auto_pay: Optional[str] = None,
l4_flavor_id: Optional[str] = None,
l7_flavor_id: Optional[str] = None,
lb_loadbalancer_v3_id: Optional[str] = None,
min_l7_flavor_id: Optional[str] = None,
name: Optional[str] = None,
period: Optional[float] = None,
period_unit: Optional[str] = None,
protection_reason: Optional[str] = None,
protection_status: Optional[str] = None,
region: Optional[str] = None,
sharetype: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[LbLoadbalancerV3TimeoutsArgs] = None,
vpc_id: Optional[str] = None)
func NewLbLoadbalancerV3(ctx *Context, name string, args LbLoadbalancerV3Args, opts ...ResourceOption) (*LbLoadbalancerV3, error)
public LbLoadbalancerV3(string name, LbLoadbalancerV3Args args, CustomResourceOptions? opts = null)
public LbLoadbalancerV3(String name, LbLoadbalancerV3Args args)
public LbLoadbalancerV3(String name, LbLoadbalancerV3Args args, CustomResourceOptions options)
type: flexibleengine:LbLoadbalancerV3
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 LbLoadbalancerV3Args
- 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 LbLoadbalancerV3Args
- 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 LbLoadbalancerV3Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbLoadbalancerV3Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LbLoadbalancerV3Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var lbLoadbalancerV3Resource = new Flexibleengine.LbLoadbalancerV3("lbLoadbalancerV3Resource", new()
{
AvailabilityZones = new[]
{
"string",
},
Ipv4SubnetId = "string",
Ipv6NetworkId = "string",
AutoRenew = "string",
BackendSubnets = new[]
{
"string",
},
BandwidthChargeMode = "string",
BandwidthId = "string",
BandwidthSize = 0,
ChargingMode = "string",
Ipv6BandwidthId = "string",
Description = "string",
EnterpriseProjectId = "string",
ForceDelete = false,
Iptype = "string",
Ipv4Address = "string",
AutoscalingEnabled = false,
Ipv4EipId = "string",
CrossVpcBackend = false,
L4FlavorId = "string",
L7FlavorId = "string",
LbLoadbalancerV3Id = "string",
MinL7FlavorId = "string",
Name = "string",
Period = 0,
PeriodUnit = "string",
ProtectionReason = "string",
ProtectionStatus = "string",
Region = "string",
Sharetype = "string",
Tags =
{
{ "string", "string" },
},
Timeouts = new Flexibleengine.Inputs.LbLoadbalancerV3TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
VpcId = "string",
});
example, err := flexibleengine.NewLbLoadbalancerV3(ctx, "lbLoadbalancerV3Resource", &flexibleengine.LbLoadbalancerV3Args{
AvailabilityZones: pulumi.StringArray{
pulumi.String("string"),
},
Ipv4SubnetId: pulumi.String("string"),
Ipv6NetworkId: pulumi.String("string"),
AutoRenew: pulumi.String("string"),
BackendSubnets: pulumi.StringArray{
pulumi.String("string"),
},
BandwidthChargeMode: pulumi.String("string"),
BandwidthId: pulumi.String("string"),
BandwidthSize: pulumi.Float64(0),
ChargingMode: pulumi.String("string"),
Ipv6BandwidthId: pulumi.String("string"),
Description: pulumi.String("string"),
EnterpriseProjectId: pulumi.String("string"),
ForceDelete: pulumi.Bool(false),
Iptype: pulumi.String("string"),
Ipv4Address: pulumi.String("string"),
AutoscalingEnabled: pulumi.Bool(false),
Ipv4EipId: pulumi.String("string"),
CrossVpcBackend: pulumi.Bool(false),
L4FlavorId: pulumi.String("string"),
L7FlavorId: pulumi.String("string"),
LbLoadbalancerV3Id: pulumi.String("string"),
MinL7FlavorId: pulumi.String("string"),
Name: pulumi.String("string"),
Period: pulumi.Float64(0),
PeriodUnit: pulumi.String("string"),
ProtectionReason: pulumi.String("string"),
ProtectionStatus: pulumi.String("string"),
Region: pulumi.String("string"),
Sharetype: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &flexibleengine.LbLoadbalancerV3TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
VpcId: pulumi.String("string"),
})
var lbLoadbalancerV3Resource = new LbLoadbalancerV3("lbLoadbalancerV3Resource", LbLoadbalancerV3Args.builder()
.availabilityZones("string")
.ipv4SubnetId("string")
.ipv6NetworkId("string")
.autoRenew("string")
.backendSubnets("string")
.bandwidthChargeMode("string")
.bandwidthId("string")
.bandwidthSize(0)
.chargingMode("string")
.ipv6BandwidthId("string")
.description("string")
.enterpriseProjectId("string")
.forceDelete(false)
.iptype("string")
.ipv4Address("string")
.autoscalingEnabled(false)
.ipv4EipId("string")
.crossVpcBackend(false)
.l4FlavorId("string")
.l7FlavorId("string")
.lbLoadbalancerV3Id("string")
.minL7FlavorId("string")
.name("string")
.period(0)
.periodUnit("string")
.protectionReason("string")
.protectionStatus("string")
.region("string")
.sharetype("string")
.tags(Map.of("string", "string"))
.timeouts(LbLoadbalancerV3TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.vpcId("string")
.build());
lb_loadbalancer_v3_resource = flexibleengine.LbLoadbalancerV3("lbLoadbalancerV3Resource",
availability_zones=["string"],
ipv4_subnet_id="string",
ipv6_network_id="string",
auto_renew="string",
backend_subnets=["string"],
bandwidth_charge_mode="string",
bandwidth_id="string",
bandwidth_size=0,
charging_mode="string",
ipv6_bandwidth_id="string",
description="string",
enterprise_project_id="string",
force_delete=False,
iptype="string",
ipv4_address="string",
autoscaling_enabled=False,
ipv4_eip_id="string",
cross_vpc_backend=False,
l4_flavor_id="string",
l7_flavor_id="string",
lb_loadbalancer_v3_id="string",
min_l7_flavor_id="string",
name="string",
period=0,
period_unit="string",
protection_reason="string",
protection_status="string",
region="string",
sharetype="string",
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
vpc_id="string")
const lbLoadbalancerV3Resource = new flexibleengine.LbLoadbalancerV3("lbLoadbalancerV3Resource", {
availabilityZones: ["string"],
ipv4SubnetId: "string",
ipv6NetworkId: "string",
autoRenew: "string",
backendSubnets: ["string"],
bandwidthChargeMode: "string",
bandwidthId: "string",
bandwidthSize: 0,
chargingMode: "string",
ipv6BandwidthId: "string",
description: "string",
enterpriseProjectId: "string",
forceDelete: false,
iptype: "string",
ipv4Address: "string",
autoscalingEnabled: false,
ipv4EipId: "string",
crossVpcBackend: false,
l4FlavorId: "string",
l7FlavorId: "string",
lbLoadbalancerV3Id: "string",
minL7FlavorId: "string",
name: "string",
period: 0,
periodUnit: "string",
protectionReason: "string",
protectionStatus: "string",
region: "string",
sharetype: "string",
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
vpcId: "string",
});
type: flexibleengine:LbLoadbalancerV3
properties:
autoRenew: string
autoscalingEnabled: false
availabilityZones:
- string
backendSubnets:
- string
bandwidthChargeMode: string
bandwidthId: string
bandwidthSize: 0
chargingMode: string
crossVpcBackend: false
description: string
enterpriseProjectId: string
forceDelete: false
iptype: string
ipv4Address: string
ipv4EipId: string
ipv4SubnetId: string
ipv6BandwidthId: string
ipv6NetworkId: string
l4FlavorId: string
l7FlavorId: string
lbLoadbalancerV3Id: string
minL7FlavorId: string
name: string
period: 0
periodUnit: string
protectionReason: string
protectionStatus: string
region: string
sharetype: string
tags:
string: string
timeouts:
create: string
delete: string
update: string
vpcId: string
LbLoadbalancerV3 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 LbLoadbalancerV3 resource accepts the following input properties:
- Availability
Zones List<string> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- Auto
Pay string - Auto
Renew string - Autoscaling
Enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- Backend
Subnets List<string> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- Bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- Bandwidth
Size double - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - Charging
Mode string - Cross
Vpc boolBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- Description string
- Human-readable description for the loadbalancer.
- Enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- Force
Delete bool - Iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- Ipv4Address string
- The ipv4 address of the load balancer.
- Ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- Ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- Ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- Ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- L4Flavor
Id string - The L4 flavor id of the load balancer.
- L7Flavor
Id string - The L7 flavor id of the load balancer.
- Lb
Loadbalancer stringV3Id - Min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- Name string
- Human-readable name for the loadbalancer.
- Period double
- Period
Unit string - Protection
Reason string - Protection
Status string - Region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Dictionary<string, string>
- The key/value pairs to associate with the loadbalancer.
- Timeouts
Lb
Loadbalancer V3Timeouts - Vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- Availability
Zones []string - Specifies the list of AZ names. Changing this parameter will create a new resource.
- Auto
Pay string - Auto
Renew string - Autoscaling
Enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- Backend
Subnets []string - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- Bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- Bandwidth
Size float64 - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - Charging
Mode string - Cross
Vpc boolBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- Description string
- Human-readable description for the loadbalancer.
- Enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- Force
Delete bool - Iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- Ipv4Address string
- The ipv4 address of the load balancer.
- Ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- Ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- Ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- Ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- L4Flavor
Id string - The L4 flavor id of the load balancer.
- L7Flavor
Id string - The L7 flavor id of the load balancer.
- Lb
Loadbalancer stringV3Id - Min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- Name string
- Human-readable name for the loadbalancer.
- Period float64
- Period
Unit string - Protection
Reason string - Protection
Status string - Region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- map[string]string
- The key/value pairs to associate with the loadbalancer.
- Timeouts
Lb
Loadbalancer V3Timeouts Args - Vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- availability
Zones List<String> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- auto
Pay String - auto
Renew String - autoscaling
Enabled Boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- backend
Subnets List<String> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge StringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id String Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size Double - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode String - cross
Vpc BooleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description String
- Human-readable description for the loadbalancer.
- enterprise
Project StringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete Boolean - iptype String
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address String
- The ipv4 address of the load balancer.
- ipv4Eip
Id String The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Subnet
Id String - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Bandwidth
Id String - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Network
Id String - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id String - The L4 flavor id of the load balancer.
- l7Flavor
Id String - The L7 flavor id of the load balancer.
- lb
Loadbalancer StringV3Id - min
L7Flavor StringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name String
- Human-readable name for the loadbalancer.
- period Double
- period
Unit String - protection
Reason String - protection
Status String - region String
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- String
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Map<String,String>
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts - vpc
Id String - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- availability
Zones string[] - Specifies the list of AZ names. Changing this parameter will create a new resource.
- auto
Pay string - auto
Renew string - autoscaling
Enabled boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- backend
Subnets string[] - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size number - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode string - cross
Vpc booleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description string
- Human-readable description for the loadbalancer.
- enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete boolean - iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address string
- The ipv4 address of the load balancer.
- ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id string - The L4 flavor id of the load balancer.
- l7Flavor
Id string - The L7 flavor id of the load balancer.
- lb
Loadbalancer stringV3Id - min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name string
- Human-readable name for the loadbalancer.
- period number
- period
Unit string - protection
Reason string - protection
Status string - region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- {[key: string]: string}
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts - vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- availability_
zones Sequence[str] - Specifies the list of AZ names. Changing this parameter will create a new resource.
- auto_
pay str - auto_
renew str - autoscaling_
enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- backend_
subnets Sequence[str] - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth_
charge_ strmode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth_
id str Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth_
size float - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging_
mode str - cross_
vpc_ boolbackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description str
- Human-readable description for the loadbalancer.
- enterprise_
project_ strid - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force_
delete bool - iptype str
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4_
address str - The ipv4 address of the load balancer.
- ipv4_
eip_ strid The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4_
subnet_ strid - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6_
bandwidth_ strid - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6_
network_ strid - The network on which to allocate the loadbalancer's ipv6 address.
- l4_
flavor_ strid - The L4 flavor id of the load balancer.
- l7_
flavor_ strid - The L7 flavor id of the load balancer.
- lb_
loadbalancer_ strv3_ id - min_
l7_ strflavor_ id - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name str
- Human-readable name for the loadbalancer.
- period float
- period_
unit str - protection_
reason str - protection_
status str - region str
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- str
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Mapping[str, str]
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts Args - vpc_
id str - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- availability
Zones List<String> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- auto
Pay String - auto
Renew String - autoscaling
Enabled Boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- backend
Subnets List<String> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge StringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id String Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size Number - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode String - cross
Vpc BooleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description String
- Human-readable description for the loadbalancer.
- enterprise
Project StringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete Boolean - iptype String
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address String
- The ipv4 address of the load balancer.
- ipv4Eip
Id String The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Subnet
Id String - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Bandwidth
Id String - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Network
Id String - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id String - The L4 flavor id of the load balancer.
- l7Flavor
Id String - The L7 flavor id of the load balancer.
- lb
Loadbalancer StringV3Id - min
L7Flavor StringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name String
- Human-readable name for the loadbalancer.
- period Number
- period
Unit String - protection
Reason String - protection
Status String - region String
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- String
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Map<String>
- The key/value pairs to associate with the loadbalancer.
- timeouts Property Map
- vpc
Id String - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
Outputs
All input properties are implicitly available as output properties. Additionally, the LbLoadbalancerV3 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- Ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- Ipv6Address string
- The ipv6 address of the Load Balancer.
- Ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- Ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- Ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- Ipv6Address string
- The ipv6 address of the Load Balancer.
- Ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- Ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv4Eip String
- The ipv4 eip address of the Load Balancer.
- ipv4Port
Id String - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv6Address String
- The ipv6 address of the Load Balancer.
- ipv6Eip String
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id String - The ipv6 eip id of the Load Balancer.
- id string
- The provider-assigned unique ID for this managed resource.
- ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv6Address string
- The ipv6 address of the Load Balancer.
- ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- id str
- The provider-assigned unique ID for this managed resource.
- ipv4_
eip str - The ipv4 eip address of the Load Balancer.
- ipv4_
port_ strid - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv6_
address str - The ipv6 address of the Load Balancer.
- ipv6_
eip str - The ipv6 eip address of the Load Balancer.
- ipv6_
eip_ strid - The ipv6 eip id of the Load Balancer.
- id String
- The provider-assigned unique ID for this managed resource.
- ipv4Eip String
- The ipv4 eip address of the Load Balancer.
- ipv4Port
Id String - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv6Address String
- The ipv6 address of the Load Balancer.
- ipv6Eip String
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id String - The ipv6 eip id of the Load Balancer.
Look up Existing LbLoadbalancerV3 Resource
Get an existing LbLoadbalancerV3 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?: LbLoadbalancerV3State, opts?: CustomResourceOptions): LbLoadbalancerV3
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_pay: Optional[str] = None,
auto_renew: Optional[str] = None,
autoscaling_enabled: Optional[bool] = None,
availability_zones: Optional[Sequence[str]] = None,
backend_subnets: Optional[Sequence[str]] = None,
bandwidth_charge_mode: Optional[str] = None,
bandwidth_id: Optional[str] = None,
bandwidth_size: Optional[float] = None,
charging_mode: Optional[str] = None,
cross_vpc_backend: Optional[bool] = None,
description: Optional[str] = None,
enterprise_project_id: Optional[str] = None,
force_delete: Optional[bool] = None,
iptype: Optional[str] = None,
ipv4_address: Optional[str] = None,
ipv4_eip: Optional[str] = None,
ipv4_eip_id: Optional[str] = None,
ipv4_port_id: Optional[str] = None,
ipv4_subnet_id: Optional[str] = None,
ipv6_address: Optional[str] = None,
ipv6_bandwidth_id: Optional[str] = None,
ipv6_eip: Optional[str] = None,
ipv6_eip_id: Optional[str] = None,
ipv6_network_id: Optional[str] = None,
l4_flavor_id: Optional[str] = None,
l7_flavor_id: Optional[str] = None,
lb_loadbalancer_v3_id: Optional[str] = None,
min_l7_flavor_id: Optional[str] = None,
name: Optional[str] = None,
period: Optional[float] = None,
period_unit: Optional[str] = None,
protection_reason: Optional[str] = None,
protection_status: Optional[str] = None,
region: Optional[str] = None,
sharetype: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[LbLoadbalancerV3TimeoutsArgs] = None,
vpc_id: Optional[str] = None) -> LbLoadbalancerV3
func GetLbLoadbalancerV3(ctx *Context, name string, id IDInput, state *LbLoadbalancerV3State, opts ...ResourceOption) (*LbLoadbalancerV3, error)
public static LbLoadbalancerV3 Get(string name, Input<string> id, LbLoadbalancerV3State? state, CustomResourceOptions? opts = null)
public static LbLoadbalancerV3 get(String name, Output<String> id, LbLoadbalancerV3State state, CustomResourceOptions options)
resources: _: type: flexibleengine:LbLoadbalancerV3 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.
- Auto
Pay string - Auto
Renew string - Autoscaling
Enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- Availability
Zones List<string> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- Backend
Subnets List<string> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- Bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- Bandwidth
Size double - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - Charging
Mode string - Cross
Vpc boolBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- Description string
- Human-readable description for the loadbalancer.
- Enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- Force
Delete bool - Iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- Ipv4Address string
- The ipv4 address of the load balancer.
- Ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- Ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- Ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- Ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- Ipv6Address string
- The ipv6 address of the Load Balancer.
- Ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- Ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- Ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- Ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- L4Flavor
Id string - The L4 flavor id of the load balancer.
- L7Flavor
Id string - The L7 flavor id of the load balancer.
- Lb
Loadbalancer stringV3Id - Min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- Name string
- Human-readable name for the loadbalancer.
- Period double
- Period
Unit string - Protection
Reason string - Protection
Status string - Region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Dictionary<string, string>
- The key/value pairs to associate with the loadbalancer.
- Timeouts
Lb
Loadbalancer V3Timeouts - Vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- Auto
Pay string - Auto
Renew string - Autoscaling
Enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- Availability
Zones []string - Specifies the list of AZ names. Changing this parameter will create a new resource.
- Backend
Subnets []string - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- Bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- Bandwidth
Size float64 - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - Charging
Mode string - Cross
Vpc boolBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- Description string
- Human-readable description for the loadbalancer.
- Enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- Force
Delete bool - Iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- Ipv4Address string
- The ipv4 address of the load balancer.
- Ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- Ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- Ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- Ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- Ipv6Address string
- The ipv6 address of the Load Balancer.
- Ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- Ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- Ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- Ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- L4Flavor
Id string - The L4 flavor id of the load balancer.
- L7Flavor
Id string - The L7 flavor id of the load balancer.
- Lb
Loadbalancer stringV3Id - Min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- Name string
- Human-readable name for the loadbalancer.
- Period float64
- Period
Unit string - Protection
Reason string - Protection
Status string - Region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- map[string]string
- The key/value pairs to associate with the loadbalancer.
- Timeouts
Lb
Loadbalancer V3Timeouts Args - Vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- auto
Pay String - auto
Renew String - autoscaling
Enabled Boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- availability
Zones List<String> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- backend
Subnets List<String> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge StringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id String Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size Double - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode String - cross
Vpc BooleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description String
- Human-readable description for the loadbalancer.
- enterprise
Project StringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete Boolean - iptype String
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address String
- The ipv4 address of the load balancer.
- ipv4Eip String
- The ipv4 eip address of the Load Balancer.
- ipv4Eip
Id String The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Port
Id String - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv4Subnet
Id String - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Address String
- The ipv6 address of the Load Balancer.
- ipv6Bandwidth
Id String - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Eip String
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id String - The ipv6 eip id of the Load Balancer.
- ipv6Network
Id String - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id String - The L4 flavor id of the load balancer.
- l7Flavor
Id String - The L7 flavor id of the load balancer.
- lb
Loadbalancer StringV3Id - min
L7Flavor StringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name String
- Human-readable name for the loadbalancer.
- period Double
- period
Unit String - protection
Reason String - protection
Status String - region String
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- String
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Map<String,String>
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts - vpc
Id String - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- auto
Pay string - auto
Renew string - autoscaling
Enabled boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- availability
Zones string[] - Specifies the list of AZ names. Changing this parameter will create a new resource.
- backend
Subnets string[] - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge stringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id string Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size number - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode string - cross
Vpc booleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description string
- Human-readable description for the loadbalancer.
- enterprise
Project stringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete boolean - iptype string
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address string
- The ipv4 address of the load balancer.
- ipv4Eip string
- The ipv4 eip address of the Load Balancer.
- ipv4Eip
Id string The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Port
Id string - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv4Subnet
Id string - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Address string
- The ipv6 address of the Load Balancer.
- ipv6Bandwidth
Id string - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Eip string
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id string - The ipv6 eip id of the Load Balancer.
- ipv6Network
Id string - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id string - The L4 flavor id of the load balancer.
- l7Flavor
Id string - The L7 flavor id of the load balancer.
- lb
Loadbalancer stringV3Id - min
L7Flavor stringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name string
- Human-readable name for the loadbalancer.
- period number
- period
Unit string - protection
Reason string - protection
Status string - region string
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- string
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- {[key: string]: string}
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts - vpc
Id string - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- auto_
pay str - auto_
renew str - autoscaling_
enabled bool - Specifies whether autoscaling is enabled. Valid values are true and false.
- availability_
zones Sequence[str] - Specifies the list of AZ names. Changing this parameter will create a new resource.
- backend_
subnets Sequence[str] - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth_
charge_ strmode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth_
id str Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth_
size float - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging_
mode str - cross_
vpc_ boolbackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description str
- Human-readable description for the loadbalancer.
- enterprise_
project_ strid - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force_
delete bool - iptype str
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4_
address str - The ipv4 address of the load balancer.
- ipv4_
eip str - The ipv4 eip address of the Load Balancer.
- ipv4_
eip_ strid The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4_
port_ strid - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv4_
subnet_ strid - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6_
address str - The ipv6 address of the Load Balancer.
- ipv6_
bandwidth_ strid - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6_
eip str - The ipv6 eip address of the Load Balancer.
- ipv6_
eip_ strid - The ipv6 eip id of the Load Balancer.
- ipv6_
network_ strid - The network on which to allocate the loadbalancer's ipv6 address.
- l4_
flavor_ strid - The L4 flavor id of the load balancer.
- l7_
flavor_ strid - The L7 flavor id of the load balancer.
- lb_
loadbalancer_ strv3_ id - min_
l7_ strflavor_ id - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name str
- Human-readable name for the loadbalancer.
- period float
- period_
unit str - protection_
reason str - protection_
status str - region str
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- str
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Mapping[str, str]
- The key/value pairs to associate with the loadbalancer.
- timeouts
Lb
Loadbalancer V3Timeouts Args - vpc_
id str - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
- auto
Pay String - auto
Renew String - autoscaling
Enabled Boolean - Specifies whether autoscaling is enabled. Valid values are true and false.
- availability
Zones List<String> - Specifies the list of AZ names. Changing this parameter will create a new resource.
- backend
Subnets List<String> - The IDs of subnets on the downstream plane.
- If this parameter is not specified, select subnets as follows:
- If IPv6 is enabled for a load balancer, the ID of subnet specified in
ipv6_network_id
will be used. - If IPv4 is enabled for a load balancer, the ID of subnet specified in
ipv4_subnet_id
will be used. - If only public network is available for a load balancer, the ID of any subnet in the VPC where the load balancer resides will be used. Subnets with more IP addresses are preferred.
- If there is more than one subnet, the first subnet in the list will be used, and the subnets must be in the VPC where the load balancer resides.
- bandwidth
Charge StringMode Bandwidth billing type. Value options:
- bandwidth: Billed by bandwidth.
- traffic: Billed by traffic.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- bandwidth
Id String Bandwidth ID of the shared bandwidth. It is mandatory when
sharetype
is WHOLE. Changing this parameter will create a new resource.NOTE: If the
bandwidth_id
parameter is configured, you can not configure the parameters:bandwidth_charge_mode
,bandwidth_size
.- bandwidth
Size Number - Bandwidth size. It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource. - charging
Mode String - cross
Vpc BooleanBackend - Enable this if you want to associate the IP addresses of backend servers with your load balancer. Can only be true when updating.
- description String
- Human-readable description for the loadbalancer.
- enterprise
Project StringId - Specifies the enterprise project id of the resource. Changing this will create a new resource.
- force
Delete Boolean - iptype String
- Elastic IP type. Changing this parameter will create a new resource.
- ipv4Address String
- The ipv4 address of the load balancer.
- ipv4Eip String
- The ipv4 eip address of the Load Balancer.
- ipv4Eip
Id String The ID of the EIP. Changing this parameter will create a new resource.
NOTE: If the
ipv4_eip_id
parameter is configured, you do not need to configure the bandwidth parameters:iptype
,bandwidth_charge_mode
,bandwidth_size
,share_type
andbandwidth_id
.- ipv4Port
Id String - The ID of the port bound to the private IPv4 address of the loadbalancer.
- ipv4Subnet
Id String - The IPv4 subnet ID of the subnet on which to allocate the loadbalancer's ipv4 address.
- ipv6Address String
- The ipv6 address of the Load Balancer.
- ipv6Bandwidth
Id String - The ipv6 bandwidth id. Only support shared bandwidth.
- ipv6Eip String
- The ipv6 eip address of the Load Balancer.
- ipv6Eip
Id String - The ipv6 eip id of the Load Balancer.
- ipv6Network
Id String - The network on which to allocate the loadbalancer's ipv6 address.
- l4Flavor
Id String - The L4 flavor id of the load balancer.
- l7Flavor
Id String - The L7 flavor id of the load balancer.
- lb
Loadbalancer StringV3Id - min
L7Flavor StringId - Specifies the ID of the minimum Layer-7 flavor for elastic scaling. This parameter cannot be left blank if there are HTTP or HTTPS listeners.
- name String
- Human-readable name for the loadbalancer.
- period Number
- period
Unit String - protection
Reason String - protection
Status String - region String
- The region in which to create the loadbalancer resource. If omitted, the provider-level region will be used. Changing this creates a new loadbalancer.
- String
Bandwidth sharing type. Value options:
- PER: Dedicated bandwidth.
- WHOLE: Shared bandwidth.
It is mandatory when
iptype
is set andbandwidth_id
is empty. Changing this parameter will create a new resource.- Map<String>
- The key/value pairs to associate with the loadbalancer.
- timeouts Property Map
- vpc
Id String - The vpc on which to create the loadbalancer. Changing this creates a new loadbalancer.
Supporting Types
LbLoadbalancerV3Timeouts, LbLoadbalancerV3TimeoutsArgs
Import
ELB loadbalancer can be imported using the loadbalancer ID, e.g.
$ pulumi import flexibleengine:index/lbLoadbalancerV3:LbLoadbalancerV3 loadbalancer_1 5c20fdad-7288-11eb-b817-0255ac10158b
Note that the imported state may not be identical to your resource definition, due to some attributes missing from the
API response, security or some other reason. The missing attributes include: ipv6_bandwidth_id
, iptype
,
bandwidth_charge_mode
, sharetype
, bandwidth_size
and bandwidth_id
.
It is generally recommended running pulumi preview
after importing a loadbalancer.
You can then decide if changes should be applied to the loadbalancer, or the resource
definition should be updated to align with the loadbalancer. Also, you can ignore changes as below.
hcl
resource “flexibleengine_lb_loadbalancer_v3” “loadbalancer_1” {
...
lifecycle {
ignore_changes = [
ipv6_bandwidth_id, iptype, bandwidth_charge_mode, sharetype, bandwidth_size, bandwidth_id,
]
}
}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.