tencentcloud.AsScalingGroup
Explore with Pulumi AI
Provides a resource to create a group of AS (Auto scaling) instances.
NOTE: If the resource management rule
forward_balancer_id
is used, resourcetencentcloud.AsLoadBalancer
management cannot be used simultaneously under the same auto scaling group id
Example Usage
Create a basic Scaling Group
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const zones = tencentcloud.getAvailabilityZonesByProduct({
product: "as",
});
const image = tencentcloud.getImages({
imageTypes: ["PUBLIC_IMAGE"],
osName: "TencentOS Server 3.2 (Final)",
});
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
vpcId: vpc.vpcId,
cidrBlock: "10.0.0.0/16",
availabilityZone: zones.then(zones => zones.zones?.[0]?.name),
});
const exampleAsScalingConfig = new tencentcloud.AsScalingConfig("exampleAsScalingConfig", {
configurationName: "tf-example",
imageId: image.then(image => image.images?.[0]?.imageId),
instanceTypes: [
"SA1.SMALL1",
"SA2.SMALL1",
"SA2.SMALL2",
"SA2.SMALL4",
],
instanceNameSettings: {
instanceName: "test-ins-name",
},
});
const exampleAsScalingGroup = new tencentcloud.AsScalingGroup("exampleAsScalingGroup", {
scalingGroupName: "tf-example",
configurationId: exampleAsScalingConfig.asScalingConfigId,
maxSize: 1,
minSize: 0,
vpcId: vpc.vpcId,
subnetIds: [subnet.subnetId],
healthCheckType: "CLB",
replaceLoadBalancerUnhealthy: true,
lbHealthCheckGracePeriod: 30,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
zones = tencentcloud.get_availability_zones_by_product(product="as")
image = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
os_name="TencentOS Server 3.2 (Final)")
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
vpc_id=vpc.vpc_id,
cidr_block="10.0.0.0/16",
availability_zone=zones.zones[0].name)
example_as_scaling_config = tencentcloud.AsScalingConfig("exampleAsScalingConfig",
configuration_name="tf-example",
image_id=image.images[0].image_id,
instance_types=[
"SA1.SMALL1",
"SA2.SMALL1",
"SA2.SMALL2",
"SA2.SMALL4",
],
instance_name_settings={
"instance_name": "test-ins-name",
})
example_as_scaling_group = tencentcloud.AsScalingGroup("exampleAsScalingGroup",
scaling_group_name="tf-example",
configuration_id=example_as_scaling_config.as_scaling_config_id,
max_size=1,
min_size=0,
vpc_id=vpc.vpc_id,
subnet_ids=[subnet.subnet_id],
health_check_type="CLB",
replace_load_balancer_unhealthy=True,
lb_health_check_grace_period=30)
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 {
zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
Product: "as",
}, nil)
if err != nil {
return err
}
image, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
ImageTypes: []string{
"PUBLIC_IMAGE",
},
OsName: pulumi.StringRef("TencentOS Server 3.2 (Final)"),
}, nil)
if err != nil {
return err
}
vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
VpcId: vpc.VpcId,
CidrBlock: pulumi.String("10.0.0.0/16"),
AvailabilityZone: pulumi.String(zones.Zones[0].Name),
})
if err != nil {
return err
}
exampleAsScalingConfig, err := tencentcloud.NewAsScalingConfig(ctx, "exampleAsScalingConfig", &tencentcloud.AsScalingConfigArgs{
ConfigurationName: pulumi.String("tf-example"),
ImageId: pulumi.String(image.Images[0].ImageId),
InstanceTypes: pulumi.StringArray{
pulumi.String("SA1.SMALL1"),
pulumi.String("SA2.SMALL1"),
pulumi.String("SA2.SMALL2"),
pulumi.String("SA2.SMALL4"),
},
InstanceNameSettings: &tencentcloud.AsScalingConfigInstanceNameSettingsArgs{
InstanceName: pulumi.String("test-ins-name"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewAsScalingGroup(ctx, "exampleAsScalingGroup", &tencentcloud.AsScalingGroupArgs{
ScalingGroupName: pulumi.String("tf-example"),
ConfigurationId: exampleAsScalingConfig.AsScalingConfigId,
MaxSize: pulumi.Float64(1),
MinSize: pulumi.Float64(0),
VpcId: vpc.VpcId,
SubnetIds: pulumi.StringArray{
subnet.SubnetId,
},
HealthCheckType: pulumi.String("CLB"),
ReplaceLoadBalancerUnhealthy: pulumi.Bool(true),
LbHealthCheckGracePeriod: pulumi.Float64(30),
})
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 zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
{
Product = "as",
});
var image = Tencentcloud.GetImages.Invoke(new()
{
ImageTypes = new[]
{
"PUBLIC_IMAGE",
},
OsName = "TencentOS Server 3.2 (Final)",
});
var vpc = new Tencentcloud.Vpc("vpc", new()
{
CidrBlock = "10.0.0.0/16",
});
var subnet = new Tencentcloud.Subnet("subnet", new()
{
VpcId = vpc.VpcId,
CidrBlock = "10.0.0.0/16",
AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[0]?.Name),
});
var exampleAsScalingConfig = new Tencentcloud.AsScalingConfig("exampleAsScalingConfig", new()
{
ConfigurationName = "tf-example",
ImageId = image.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
InstanceTypes = new[]
{
"SA1.SMALL1",
"SA2.SMALL1",
"SA2.SMALL2",
"SA2.SMALL4",
},
InstanceNameSettings = new Tencentcloud.Inputs.AsScalingConfigInstanceNameSettingsArgs
{
InstanceName = "test-ins-name",
},
});
var exampleAsScalingGroup = new Tencentcloud.AsScalingGroup("exampleAsScalingGroup", new()
{
ScalingGroupName = "tf-example",
ConfigurationId = exampleAsScalingConfig.AsScalingConfigId,
MaxSize = 1,
MinSize = 0,
VpcId = vpc.VpcId,
SubnetIds = new[]
{
subnet.SubnetId,
},
HealthCheckType = "CLB",
ReplaceLoadBalancerUnhealthy = true,
LbHealthCheckGracePeriod = 30,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.AsScalingConfig;
import com.pulumi.tencentcloud.AsScalingConfigArgs;
import com.pulumi.tencentcloud.inputs.AsScalingConfigInstanceNameSettingsArgs;
import com.pulumi.tencentcloud.AsScalingGroup;
import com.pulumi.tencentcloud.AsScalingGroupArgs;
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 zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
.product("as")
.build());
final var image = TencentcloudFunctions.getImages(GetImagesArgs.builder()
.imageTypes("PUBLIC_IMAGE")
.osName("TencentOS Server 3.2 (Final)")
.build());
var vpc = new Vpc("vpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.vpcId(vpc.vpcId())
.cidrBlock("10.0.0.0/16")
.availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[0].name()))
.build());
var exampleAsScalingConfig = new AsScalingConfig("exampleAsScalingConfig", AsScalingConfigArgs.builder()
.configurationName("tf-example")
.imageId(image.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
.instanceTypes(
"SA1.SMALL1",
"SA2.SMALL1",
"SA2.SMALL2",
"SA2.SMALL4")
.instanceNameSettings(AsScalingConfigInstanceNameSettingsArgs.builder()
.instanceName("test-ins-name")
.build())
.build());
var exampleAsScalingGroup = new AsScalingGroup("exampleAsScalingGroup", AsScalingGroupArgs.builder()
.scalingGroupName("tf-example")
.configurationId(exampleAsScalingConfig.asScalingConfigId())
.maxSize(1)
.minSize(0)
.vpcId(vpc.vpcId())
.subnetIds(subnet.subnetId())
.healthCheckType("CLB")
.replaceLoadBalancerUnhealthy(true)
.lbHealthCheckGracePeriod(30)
.build());
}
}
resources:
vpc:
type: tencentcloud:Vpc
properties:
cidrBlock: 10.0.0.0/16
subnet:
type: tencentcloud:Subnet
properties:
vpcId: ${vpc.vpcId}
cidrBlock: 10.0.0.0/16
availabilityZone: ${zones.zones[0].name}
exampleAsScalingConfig:
type: tencentcloud:AsScalingConfig
properties:
configurationName: tf-example
imageId: ${image.images[0].imageId}
instanceTypes:
- SA1.SMALL1
- SA2.SMALL1
- SA2.SMALL2
- SA2.SMALL4
instanceNameSettings:
instanceName: test-ins-name
exampleAsScalingGroup:
type: tencentcloud:AsScalingGroup
properties:
scalingGroupName: tf-example
configurationId: ${exampleAsScalingConfig.asScalingConfigId}
maxSize: 1
minSize: 0
vpcId: ${vpc.vpcId}
subnetIds:
- ${subnet.subnetId}
healthCheckType: CLB
replaceLoadBalancerUnhealthy: true
lbHealthCheckGracePeriod: 30
variables:
zones:
fn::invoke:
function: tencentcloud:getAvailabilityZonesByProduct
arguments:
product: as
image:
fn::invoke:
function: tencentcloud:getImages
arguments:
imageTypes:
- PUBLIC_IMAGE
osName: TencentOS Server 3.2 (Final)
Create a complete Scaling Group
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleClbInstance = new tencentcloud.ClbInstance("exampleClbInstance", {
networkType: "INTERNAL",
clbName: "clb-example",
projectId: 0,
vpcId: tencentcloud_vpc.vpc.id,
subnetId: tencentcloud_subnet.subnet.id,
tags: {
test: "tf",
},
});
const exampleClbListener = new tencentcloud.ClbListener("exampleClbListener", {
clbId: exampleClbInstance.clbInstanceId,
listenerName: "listener-example",
port: 80,
protocol: "HTTP",
});
const exampleClbListenerRule = new tencentcloud.ClbListenerRule("exampleClbListenerRule", {
listenerId: exampleClbListener.listenerId,
clbId: exampleClbInstance.clbInstanceId,
domain: "foo.net",
url: "/bar",
});
const exampleAsScalingGroup = new tencentcloud.AsScalingGroup("exampleAsScalingGroup", {
scalingGroupName: "tf-example",
configurationId: tencentcloud_as_scaling_config.example.id,
maxSize: 1,
minSize: 0,
vpcId: tencentcloud_vpc.vpc.id,
subnetIds: [tencentcloud_subnet.subnet.id],
projectId: 0,
defaultCooldown: 400,
desiredCapacity: 1,
replaceMonitorUnhealthy: false,
scalingMode: "CLASSIC_SCALING",
replaceLoadBalancerUnhealthy: false,
replaceMode: "RECREATE",
desiredCapacitySyncWithMaxMinSize: false,
terminationPolicies: ["NEWEST_INSTANCE"],
retryPolicy: "INCREMENTAL_INTERVALS",
forwardBalancerIds: [{
loadBalancerId: exampleClbInstance.clbInstanceId,
listenerId: exampleClbListener.listenerId,
ruleId: exampleClbListenerRule.ruleId,
targetAttributes: [{
port: 80,
weight: 90,
}],
}],
tags: {
createBy: "tfExample",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example_clb_instance = tencentcloud.ClbInstance("exampleClbInstance",
network_type="INTERNAL",
clb_name="clb-example",
project_id=0,
vpc_id=tencentcloud_vpc["vpc"]["id"],
subnet_id=tencentcloud_subnet["subnet"]["id"],
tags={
"test": "tf",
})
example_clb_listener = tencentcloud.ClbListener("exampleClbListener",
clb_id=example_clb_instance.clb_instance_id,
listener_name="listener-example",
port=80,
protocol="HTTP")
example_clb_listener_rule = tencentcloud.ClbListenerRule("exampleClbListenerRule",
listener_id=example_clb_listener.listener_id,
clb_id=example_clb_instance.clb_instance_id,
domain="foo.net",
url="/bar")
example_as_scaling_group = tencentcloud.AsScalingGroup("exampleAsScalingGroup",
scaling_group_name="tf-example",
configuration_id=tencentcloud_as_scaling_config["example"]["id"],
max_size=1,
min_size=0,
vpc_id=tencentcloud_vpc["vpc"]["id"],
subnet_ids=[tencentcloud_subnet["subnet"]["id"]],
project_id=0,
default_cooldown=400,
desired_capacity=1,
replace_monitor_unhealthy=False,
scaling_mode="CLASSIC_SCALING",
replace_load_balancer_unhealthy=False,
replace_mode="RECREATE",
desired_capacity_sync_with_max_min_size=False,
termination_policies=["NEWEST_INSTANCE"],
retry_policy="INCREMENTAL_INTERVALS",
forward_balancer_ids=[{
"load_balancer_id": example_clb_instance.clb_instance_id,
"listener_id": example_clb_listener.listener_id,
"rule_id": example_clb_listener_rule.rule_id,
"target_attributes": [{
"port": 80,
"weight": 90,
}],
}],
tags={
"createBy": "tfExample",
})
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 {
exampleClbInstance, err := tencentcloud.NewClbInstance(ctx, "exampleClbInstance", &tencentcloud.ClbInstanceArgs{
NetworkType: pulumi.String("INTERNAL"),
ClbName: pulumi.String("clb-example"),
ProjectId: pulumi.Float64(0),
VpcId: pulumi.Any(tencentcloud_vpc.Vpc.Id),
SubnetId: pulumi.Any(tencentcloud_subnet.Subnet.Id),
Tags: pulumi.StringMap{
"test": pulumi.String("tf"),
},
})
if err != nil {
return err
}
exampleClbListener, err := tencentcloud.NewClbListener(ctx, "exampleClbListener", &tencentcloud.ClbListenerArgs{
ClbId: exampleClbInstance.ClbInstanceId,
ListenerName: pulumi.String("listener-example"),
Port: pulumi.Float64(80),
Protocol: pulumi.String("HTTP"),
})
if err != nil {
return err
}
exampleClbListenerRule, err := tencentcloud.NewClbListenerRule(ctx, "exampleClbListenerRule", &tencentcloud.ClbListenerRuleArgs{
ListenerId: exampleClbListener.ListenerId,
ClbId: exampleClbInstance.ClbInstanceId,
Domain: pulumi.String("foo.net"),
Url: pulumi.String("/bar"),
})
if err != nil {
return err
}
_, err = tencentcloud.NewAsScalingGroup(ctx, "exampleAsScalingGroup", &tencentcloud.AsScalingGroupArgs{
ScalingGroupName: pulumi.String("tf-example"),
ConfigurationId: pulumi.Any(tencentcloud_as_scaling_config.Example.Id),
MaxSize: pulumi.Float64(1),
MinSize: pulumi.Float64(0),
VpcId: pulumi.Any(tencentcloud_vpc.Vpc.Id),
SubnetIds: pulumi.StringArray{
tencentcloud_subnet.Subnet.Id,
},
ProjectId: pulumi.Float64(0),
DefaultCooldown: pulumi.Float64(400),
DesiredCapacity: pulumi.Float64(1),
ReplaceMonitorUnhealthy: pulumi.Bool(false),
ScalingMode: pulumi.String("CLASSIC_SCALING"),
ReplaceLoadBalancerUnhealthy: pulumi.Bool(false),
ReplaceMode: pulumi.String("RECREATE"),
DesiredCapacitySyncWithMaxMinSize: pulumi.Bool(false),
TerminationPolicies: pulumi.StringArray{
pulumi.String("NEWEST_INSTANCE"),
},
RetryPolicy: pulumi.String("INCREMENTAL_INTERVALS"),
ForwardBalancerIds: tencentcloud.AsScalingGroupForwardBalancerIdArray{
&tencentcloud.AsScalingGroupForwardBalancerIdArgs{
LoadBalancerId: exampleClbInstance.ClbInstanceId,
ListenerId: exampleClbListener.ListenerId,
RuleId: exampleClbListenerRule.RuleId,
TargetAttributes: tencentcloud.AsScalingGroupForwardBalancerIdTargetAttributeArray{
&tencentcloud.AsScalingGroupForwardBalancerIdTargetAttributeArgs{
Port: pulumi.Float64(80),
Weight: pulumi.Float64(90),
},
},
},
},
Tags: pulumi.StringMap{
"createBy": pulumi.String("tfExample"),
},
})
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 exampleClbInstance = new Tencentcloud.ClbInstance("exampleClbInstance", new()
{
NetworkType = "INTERNAL",
ClbName = "clb-example",
ProjectId = 0,
VpcId = tencentcloud_vpc.Vpc.Id,
SubnetId = tencentcloud_subnet.Subnet.Id,
Tags =
{
{ "test", "tf" },
},
});
var exampleClbListener = new Tencentcloud.ClbListener("exampleClbListener", new()
{
ClbId = exampleClbInstance.ClbInstanceId,
ListenerName = "listener-example",
Port = 80,
Protocol = "HTTP",
});
var exampleClbListenerRule = new Tencentcloud.ClbListenerRule("exampleClbListenerRule", new()
{
ListenerId = exampleClbListener.ListenerId,
ClbId = exampleClbInstance.ClbInstanceId,
Domain = "foo.net",
Url = "/bar",
});
var exampleAsScalingGroup = new Tencentcloud.AsScalingGroup("exampleAsScalingGroup", new()
{
ScalingGroupName = "tf-example",
ConfigurationId = tencentcloud_as_scaling_config.Example.Id,
MaxSize = 1,
MinSize = 0,
VpcId = tencentcloud_vpc.Vpc.Id,
SubnetIds = new[]
{
tencentcloud_subnet.Subnet.Id,
},
ProjectId = 0,
DefaultCooldown = 400,
DesiredCapacity = 1,
ReplaceMonitorUnhealthy = false,
ScalingMode = "CLASSIC_SCALING",
ReplaceLoadBalancerUnhealthy = false,
ReplaceMode = "RECREATE",
DesiredCapacitySyncWithMaxMinSize = false,
TerminationPolicies = new[]
{
"NEWEST_INSTANCE",
},
RetryPolicy = "INCREMENTAL_INTERVALS",
ForwardBalancerIds = new[]
{
new Tencentcloud.Inputs.AsScalingGroupForwardBalancerIdArgs
{
LoadBalancerId = exampleClbInstance.ClbInstanceId,
ListenerId = exampleClbListener.ListenerId,
RuleId = exampleClbListenerRule.RuleId,
TargetAttributes = new[]
{
new Tencentcloud.Inputs.AsScalingGroupForwardBalancerIdTargetAttributeArgs
{
Port = 80,
Weight = 90,
},
},
},
},
Tags =
{
{ "createBy", "tfExample" },
},
});
});
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 com.pulumi.tencentcloud.ClbListener;
import com.pulumi.tencentcloud.ClbListenerArgs;
import com.pulumi.tencentcloud.ClbListenerRule;
import com.pulumi.tencentcloud.ClbListenerRuleArgs;
import com.pulumi.tencentcloud.AsScalingGroup;
import com.pulumi.tencentcloud.AsScalingGroupArgs;
import com.pulumi.tencentcloud.inputs.AsScalingGroupForwardBalancerIdArgs;
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 exampleClbInstance = new ClbInstance("exampleClbInstance", ClbInstanceArgs.builder()
.networkType("INTERNAL")
.clbName("clb-example")
.projectId(0)
.vpcId(tencentcloud_vpc.vpc().id())
.subnetId(tencentcloud_subnet.subnet().id())
.tags(Map.of("test", "tf"))
.build());
var exampleClbListener = new ClbListener("exampleClbListener", ClbListenerArgs.builder()
.clbId(exampleClbInstance.clbInstanceId())
.listenerName("listener-example")
.port(80)
.protocol("HTTP")
.build());
var exampleClbListenerRule = new ClbListenerRule("exampleClbListenerRule", ClbListenerRuleArgs.builder()
.listenerId(exampleClbListener.listenerId())
.clbId(exampleClbInstance.clbInstanceId())
.domain("foo.net")
.url("/bar")
.build());
var exampleAsScalingGroup = new AsScalingGroup("exampleAsScalingGroup", AsScalingGroupArgs.builder()
.scalingGroupName("tf-example")
.configurationId(tencentcloud_as_scaling_config.example().id())
.maxSize(1)
.minSize(0)
.vpcId(tencentcloud_vpc.vpc().id())
.subnetIds(tencentcloud_subnet.subnet().id())
.projectId(0)
.defaultCooldown(400)
.desiredCapacity(1)
.replaceMonitorUnhealthy(false)
.scalingMode("CLASSIC_SCALING")
.replaceLoadBalancerUnhealthy(false)
.replaceMode("RECREATE")
.desiredCapacitySyncWithMaxMinSize(false)
.terminationPolicies("NEWEST_INSTANCE")
.retryPolicy("INCREMENTAL_INTERVALS")
.forwardBalancerIds(AsScalingGroupForwardBalancerIdArgs.builder()
.loadBalancerId(exampleClbInstance.clbInstanceId())
.listenerId(exampleClbListener.listenerId())
.ruleId(exampleClbListenerRule.ruleId())
.targetAttributes(AsScalingGroupForwardBalancerIdTargetAttributeArgs.builder()
.port(80)
.weight(90)
.build())
.build())
.tags(Map.of("createBy", "tfExample"))
.build());
}
}
resources:
exampleClbInstance:
type: tencentcloud:ClbInstance
properties:
networkType: INTERNAL
clbName: clb-example
projectId: 0
vpcId: ${tencentcloud_vpc.vpc.id}
subnetId: ${tencentcloud_subnet.subnet.id}
tags:
test: tf
exampleClbListener:
type: tencentcloud:ClbListener
properties:
clbId: ${exampleClbInstance.clbInstanceId}
listenerName: listener-example
port: 80
protocol: HTTP
exampleClbListenerRule:
type: tencentcloud:ClbListenerRule
properties:
listenerId: ${exampleClbListener.listenerId}
clbId: ${exampleClbInstance.clbInstanceId}
domain: foo.net
url: /bar
exampleAsScalingGroup:
type: tencentcloud:AsScalingGroup
properties:
scalingGroupName: tf-example
configurationId: ${tencentcloud_as_scaling_config.example.id}
maxSize: 1
minSize: 0
vpcId: ${tencentcloud_vpc.vpc.id}
subnetIds:
- ${tencentcloud_subnet.subnet.id}
projectId: 0
defaultCooldown: 400
desiredCapacity: 1
replaceMonitorUnhealthy: false
scalingMode: CLASSIC_SCALING
replaceLoadBalancerUnhealthy: false
replaceMode: RECREATE
desiredCapacitySyncWithMaxMinSize: false
terminationPolicies:
- NEWEST_INSTANCE
retryPolicy: INCREMENTAL_INTERVALS
forwardBalancerIds:
- loadBalancerId: ${exampleClbInstance.clbInstanceId}
listenerId: ${exampleClbListener.listenerId}
ruleId: ${exampleClbListenerRule.ruleId}
targetAttributes:
- port: 80
weight: 90
tags:
createBy: tfExample
Create AsScalingGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AsScalingGroup(name: string, args: AsScalingGroupArgs, opts?: CustomResourceOptions);
@overload
def AsScalingGroup(resource_name: str,
args: AsScalingGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AsScalingGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_size: Optional[float] = None,
configuration_id: Optional[str] = None,
vpc_id: Optional[str] = None,
scaling_group_name: Optional[str] = None,
min_size: Optional[float] = None,
project_id: Optional[float] = None,
replace_mode: Optional[str] = None,
lb_health_check_grace_period: Optional[float] = None,
load_balancer_ids: Optional[Sequence[str]] = None,
forward_balancer_ids: Optional[Sequence[AsScalingGroupForwardBalancerIdArgs]] = None,
desired_capacity_sync_with_max_min_size: Optional[bool] = None,
multi_zone_subnet_policy: Optional[str] = None,
as_scaling_group_id: Optional[str] = None,
replace_load_balancer_unhealthy: Optional[bool] = None,
health_check_type: Optional[str] = None,
replace_monitor_unhealthy: Optional[bool] = None,
retry_policy: Optional[str] = None,
desired_capacity: Optional[float] = None,
scaling_mode: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
termination_policies: Optional[Sequence[str]] = None,
default_cooldown: Optional[float] = None,
zones: Optional[Sequence[str]] = None)
func NewAsScalingGroup(ctx *Context, name string, args AsScalingGroupArgs, opts ...ResourceOption) (*AsScalingGroup, error)
public AsScalingGroup(string name, AsScalingGroupArgs args, CustomResourceOptions? opts = null)
public AsScalingGroup(String name, AsScalingGroupArgs args)
public AsScalingGroup(String name, AsScalingGroupArgs args, CustomResourceOptions options)
type: tencentcloud:AsScalingGroup
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 AsScalingGroupArgs
- 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 AsScalingGroupArgs
- 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 AsScalingGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AsScalingGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AsScalingGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AsScalingGroup 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 AsScalingGroup resource accepts the following input properties:
- Configuration
Id string - An available ID for a launch configuration.
- Max
Size double - Maximum number of CVM instances. Valid value ranges: (0~2000).
- Min
Size double - Minimum number of CVM instances. Valid value ranges: (0~2000).
- Scaling
Group stringName - Name of a scaling group.
- Vpc
Id string - ID of VPC network.
- As
Scaling stringGroup Id - ID of the resource.
- Default
Cooldown double - Default cooldown time in second, and default value is
300
. - Desired
Capacity double - Desired volume of CVM instances, which is between
max_size
andmin_size
. - Desired
Capacity boolSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - Forward
Balancer List<AsIds Scaling Group Forward Balancer Id> - List of application load balancers, which can't be specified with
load_balancer_ids
together. - Health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - Lb
Health doubleCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - Load
Balancer List<string>Ids - ID list of traditional load balancers.
- Multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- Project
Id double - Specifies to which project the scaling group belongs.
- Replace
Load boolBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - Replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- Replace
Monitor boolUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - Retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- Scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - Subnet
Ids List<string> - ID list of subnet, and for VPC it is required.
- Dictionary<string, string>
- Tags of a scaling group.
- Termination
Policies List<string> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- Zones List<string>
- List of available zones, for Basic network it is required.
- Configuration
Id string - An available ID for a launch configuration.
- Max
Size float64 - Maximum number of CVM instances. Valid value ranges: (0~2000).
- Min
Size float64 - Minimum number of CVM instances. Valid value ranges: (0~2000).
- Scaling
Group stringName - Name of a scaling group.
- Vpc
Id string - ID of VPC network.
- As
Scaling stringGroup Id - ID of the resource.
- Default
Cooldown float64 - Default cooldown time in second, and default value is
300
. - Desired
Capacity float64 - Desired volume of CVM instances, which is between
max_size
andmin_size
. - Desired
Capacity boolSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - Forward
Balancer []AsIds Scaling Group Forward Balancer Id Args - List of application load balancers, which can't be specified with
load_balancer_ids
together. - Health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - Lb
Health float64Check Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - Load
Balancer []stringIds - ID list of traditional load balancers.
- Multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- Project
Id float64 - Specifies to which project the scaling group belongs.
- Replace
Load boolBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - Replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- Replace
Monitor boolUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - Retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- Scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - Subnet
Ids []string - ID list of subnet, and for VPC it is required.
- map[string]string
- Tags of a scaling group.
- Termination
Policies []string - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- Zones []string
- List of available zones, for Basic network it is required.
- configuration
Id String - An available ID for a launch configuration.
- max
Size Double - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size Double - Minimum number of CVM instances. Valid value ranges: (0~2000).
- scaling
Group StringName - Name of a scaling group.
- vpc
Id String - ID of VPC network.
- as
Scaling StringGroup Id - ID of the resource.
- default
Cooldown Double - Default cooldown time in second, and default value is
300
. - desired
Capacity Double - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity BooleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer List<AsIds Scaling Group Forward Balancer Id> - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check StringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - lb
Health DoubleCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer List<String>Ids - ID list of traditional load balancers.
- multi
Zone StringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id Double - Specifies to which project the scaling group belongs.
- replace
Load BooleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode String - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor BooleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy String - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Mode String - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - subnet
Ids List<String> - ID list of subnet, and for VPC it is required.
- Map<String,String>
- Tags of a scaling group.
- termination
Policies List<String> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- zones List<String>
- List of available zones, for Basic network it is required.
- configuration
Id string - An available ID for a launch configuration.
- max
Size number - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size number - Minimum number of CVM instances. Valid value ranges: (0~2000).
- scaling
Group stringName - Name of a scaling group.
- vpc
Id string - ID of VPC network.
- as
Scaling stringGroup Id - ID of the resource.
- default
Cooldown number - Default cooldown time in second, and default value is
300
. - desired
Capacity number - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity booleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer AsIds Scaling Group Forward Balancer Id[] - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - lb
Health numberCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer string[]Ids - ID list of traditional load balancers.
- multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id number - Specifies to which project the scaling group belongs.
- replace
Load booleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor booleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - subnet
Ids string[] - ID list of subnet, and for VPC it is required.
- {[key: string]: string}
- Tags of a scaling group.
- termination
Policies string[] - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- zones string[]
- List of available zones, for Basic network it is required.
- configuration_
id str - An available ID for a launch configuration.
- max_
size float - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min_
size float - Minimum number of CVM instances. Valid value ranges: (0~2000).
- scaling_
group_ strname - Name of a scaling group.
- vpc_
id str - ID of VPC network.
- as_
scaling_ strgroup_ id - ID of the resource.
- default_
cooldown float - Default cooldown time in second, and default value is
300
. - desired_
capacity float - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired_
capacity_ boolsync_ with_ max_ min_ size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward_
balancer_ Sequence[Asids Scaling Group Forward Balancer Id Args] - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health_
check_ strtype - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - lb_
health_ floatcheck_ grace_ period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load_
balancer_ Sequence[str]ids - ID list of traditional load balancers.
- multi_
zone_ strsubnet_ policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project_
id float - Specifies to which project the scaling group belongs.
- replace_
load_ boolbalancer_ unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace_
mode str - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace_
monitor_ boolunhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry_
policy str - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling_
mode str - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - subnet_
ids Sequence[str] - ID list of subnet, and for VPC it is required.
- Mapping[str, str]
- Tags of a scaling group.
- termination_
policies Sequence[str] - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- zones Sequence[str]
- List of available zones, for Basic network it is required.
- configuration
Id String - An available ID for a launch configuration.
- max
Size Number - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size Number - Minimum number of CVM instances. Valid value ranges: (0~2000).
- scaling
Group StringName - Name of a scaling group.
- vpc
Id String - ID of VPC network.
- as
Scaling StringGroup Id - ID of the resource.
- default
Cooldown Number - Default cooldown time in second, and default value is
300
. - desired
Capacity Number - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity BooleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer List<Property Map>Ids - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check StringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - lb
Health NumberCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer List<String>Ids - ID list of traditional load balancers.
- multi
Zone StringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id Number - Specifies to which project the scaling group belongs.
- replace
Load BooleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode String - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor BooleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy String - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Mode String - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - subnet
Ids List<String> - ID list of subnet, and for VPC it is required.
- Map<String>
- Tags of a scaling group.
- termination
Policies List<String> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- zones List<String>
- List of available zones, for Basic network it is required.
Outputs
All input properties are implicitly available as output properties. Additionally, the AsScalingGroup resource produces the following output properties:
- Create
Time string - The time when the AS group was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Count double - Instance number of a scaling group.
- Status string
- Current status of a scaling group.
- Create
Time string - The time when the AS group was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Count float64 - Instance number of a scaling group.
- Status string
- Current status of a scaling group.
- create
Time String - The time when the AS group was created.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Count Double - Instance number of a scaling group.
- status String
- Current status of a scaling group.
- create
Time string - The time when the AS group was created.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Count number - Instance number of a scaling group.
- status string
- Current status of a scaling group.
- create_
time str - The time when the AS group was created.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
count float - Instance number of a scaling group.
- status str
- Current status of a scaling group.
- create
Time String - The time when the AS group was created.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Count Number - Instance number of a scaling group.
- status String
- Current status of a scaling group.
Look up Existing AsScalingGroup Resource
Get an existing AsScalingGroup 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?: AsScalingGroupState, opts?: CustomResourceOptions): AsScalingGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
as_scaling_group_id: Optional[str] = None,
configuration_id: Optional[str] = None,
create_time: Optional[str] = None,
default_cooldown: Optional[float] = None,
desired_capacity: Optional[float] = None,
desired_capacity_sync_with_max_min_size: Optional[bool] = None,
forward_balancer_ids: Optional[Sequence[AsScalingGroupForwardBalancerIdArgs]] = None,
health_check_type: Optional[str] = None,
instance_count: Optional[float] = None,
lb_health_check_grace_period: Optional[float] = None,
load_balancer_ids: Optional[Sequence[str]] = None,
max_size: Optional[float] = None,
min_size: Optional[float] = None,
multi_zone_subnet_policy: Optional[str] = None,
project_id: Optional[float] = None,
replace_load_balancer_unhealthy: Optional[bool] = None,
replace_mode: Optional[str] = None,
replace_monitor_unhealthy: Optional[bool] = None,
retry_policy: Optional[str] = None,
scaling_group_name: Optional[str] = None,
scaling_mode: Optional[str] = None,
status: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
termination_policies: Optional[Sequence[str]] = None,
vpc_id: Optional[str] = None,
zones: Optional[Sequence[str]] = None) -> AsScalingGroup
func GetAsScalingGroup(ctx *Context, name string, id IDInput, state *AsScalingGroupState, opts ...ResourceOption) (*AsScalingGroup, error)
public static AsScalingGroup Get(string name, Input<string> id, AsScalingGroupState? state, CustomResourceOptions? opts = null)
public static AsScalingGroup get(String name, Output<String> id, AsScalingGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:AsScalingGroup 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.
- As
Scaling stringGroup Id - ID of the resource.
- Configuration
Id string - An available ID for a launch configuration.
- Create
Time string - The time when the AS group was created.
- Default
Cooldown double - Default cooldown time in second, and default value is
300
. - Desired
Capacity double - Desired volume of CVM instances, which is between
max_size
andmin_size
. - Desired
Capacity boolSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - Forward
Balancer List<AsIds Scaling Group Forward Balancer Id> - List of application load balancers, which can't be specified with
load_balancer_ids
together. - Health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - Instance
Count double - Instance number of a scaling group.
- Lb
Health doubleCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - Load
Balancer List<string>Ids - ID list of traditional load balancers.
- Max
Size double - Maximum number of CVM instances. Valid value ranges: (0~2000).
- Min
Size double - Minimum number of CVM instances. Valid value ranges: (0~2000).
- Multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- Project
Id double - Specifies to which project the scaling group belongs.
- Replace
Load boolBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - Replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- Replace
Monitor boolUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - Retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- Scaling
Group stringName - Name of a scaling group.
- Scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - Status string
- Current status of a scaling group.
- Subnet
Ids List<string> - ID list of subnet, and for VPC it is required.
- Dictionary<string, string>
- Tags of a scaling group.
- Termination
Policies List<string> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- Vpc
Id string - ID of VPC network.
- Zones List<string>
- List of available zones, for Basic network it is required.
- As
Scaling stringGroup Id - ID of the resource.
- Configuration
Id string - An available ID for a launch configuration.
- Create
Time string - The time when the AS group was created.
- Default
Cooldown float64 - Default cooldown time in second, and default value is
300
. - Desired
Capacity float64 - Desired volume of CVM instances, which is between
max_size
andmin_size
. - Desired
Capacity boolSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - Forward
Balancer []AsIds Scaling Group Forward Balancer Id Args - List of application load balancers, which can't be specified with
load_balancer_ids
together. - Health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - Instance
Count float64 - Instance number of a scaling group.
- Lb
Health float64Check Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - Load
Balancer []stringIds - ID list of traditional load balancers.
- Max
Size float64 - Maximum number of CVM instances. Valid value ranges: (0~2000).
- Min
Size float64 - Minimum number of CVM instances. Valid value ranges: (0~2000).
- Multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- Project
Id float64 - Specifies to which project the scaling group belongs.
- Replace
Load boolBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - Replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- Replace
Monitor boolUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - Retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- Scaling
Group stringName - Name of a scaling group.
- Scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - Status string
- Current status of a scaling group.
- Subnet
Ids []string - ID list of subnet, and for VPC it is required.
- map[string]string
- Tags of a scaling group.
- Termination
Policies []string - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- Vpc
Id string - ID of VPC network.
- Zones []string
- List of available zones, for Basic network it is required.
- as
Scaling StringGroup Id - ID of the resource.
- configuration
Id String - An available ID for a launch configuration.
- create
Time String - The time when the AS group was created.
- default
Cooldown Double - Default cooldown time in second, and default value is
300
. - desired
Capacity Double - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity BooleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer List<AsIds Scaling Group Forward Balancer Id> - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check StringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - instance
Count Double - Instance number of a scaling group.
- lb
Health DoubleCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer List<String>Ids - ID list of traditional load balancers.
- max
Size Double - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size Double - Minimum number of CVM instances. Valid value ranges: (0~2000).
- multi
Zone StringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id Double - Specifies to which project the scaling group belongs.
- replace
Load BooleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode String - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor BooleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy String - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Group StringName - Name of a scaling group.
- scaling
Mode String - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - status String
- Current status of a scaling group.
- subnet
Ids List<String> - ID list of subnet, and for VPC it is required.
- Map<String,String>
- Tags of a scaling group.
- termination
Policies List<String> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- vpc
Id String - ID of VPC network.
- zones List<String>
- List of available zones, for Basic network it is required.
- as
Scaling stringGroup Id - ID of the resource.
- configuration
Id string - An available ID for a launch configuration.
- create
Time string - The time when the AS group was created.
- default
Cooldown number - Default cooldown time in second, and default value is
300
. - desired
Capacity number - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity booleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer AsIds Scaling Group Forward Balancer Id[] - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check stringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - instance
Count number - Instance number of a scaling group.
- lb
Health numberCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer string[]Ids - ID list of traditional load balancers.
- max
Size number - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size number - Minimum number of CVM instances. Valid value ranges: (0~2000).
- multi
Zone stringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id number - Specifies to which project the scaling group belongs.
- replace
Load booleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode string - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor booleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy string - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Group stringName - Name of a scaling group.
- scaling
Mode string - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - status string
- Current status of a scaling group.
- subnet
Ids string[] - ID list of subnet, and for VPC it is required.
- {[key: string]: string}
- Tags of a scaling group.
- termination
Policies string[] - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- vpc
Id string - ID of VPC network.
- zones string[]
- List of available zones, for Basic network it is required.
- as_
scaling_ strgroup_ id - ID of the resource.
- configuration_
id str - An available ID for a launch configuration.
- create_
time str - The time when the AS group was created.
- default_
cooldown float - Default cooldown time in second, and default value is
300
. - desired_
capacity float - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired_
capacity_ boolsync_ with_ max_ min_ size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward_
balancer_ Sequence[Asids Scaling Group Forward Balancer Id Args] - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health_
check_ strtype - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - instance_
count float - Instance number of a scaling group.
- lb_
health_ floatcheck_ grace_ period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load_
balancer_ Sequence[str]ids - ID list of traditional load balancers.
- max_
size float - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min_
size float - Minimum number of CVM instances. Valid value ranges: (0~2000).
- multi_
zone_ strsubnet_ policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project_
id float - Specifies to which project the scaling group belongs.
- replace_
load_ boolbalancer_ unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace_
mode str - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace_
monitor_ boolunhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry_
policy str - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling_
group_ strname - Name of a scaling group.
- scaling_
mode str - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - status str
- Current status of a scaling group.
- subnet_
ids Sequence[str] - ID list of subnet, and for VPC it is required.
- Mapping[str, str]
- Tags of a scaling group.
- termination_
policies Sequence[str] - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- vpc_
id str - ID of VPC network.
- zones Sequence[str]
- List of available zones, for Basic network it is required.
- as
Scaling StringGroup Id - ID of the resource.
- configuration
Id String - An available ID for a launch configuration.
- create
Time String - The time when the AS group was created.
- default
Cooldown Number - Default cooldown time in second, and default value is
300
. - desired
Capacity Number - Desired volume of CVM instances, which is between
max_size
andmin_size
. - desired
Capacity BooleanSync With Max Min Size - The expected number of instances is synchronized with the maximum and minimum values. The default value is
False
. This parameter is effective only in the scenario where the expected number is not passed in when modifying the scaling group interface. True: When modifying the maximum or minimum value, if there is a conflict with the current expected number, the expected number is adjusted synchronously. For example, when modifying, if the minimum value 2 is passed in and the current expected number is 1, the expected number is adjusted synchronously to 2; False: When modifying the maximum or minimum value, if there is a conflict with the current expected number, an error message is displayed indicating that the modification is not allowed. - forward
Balancer List<Property Map>Ids - List of application load balancers, which can't be specified with
load_balancer_ids
together. - health
Check StringType - Health check type of instances in a scaling group.CVM: confirm whether an instance is healthy based on the network status. If the pinged instance is unreachable, the instance will be considered unhealthy. For more information, see Instance Health CheckCLB: confirm whether an instance is healthy based on the CLB health check status. For more information, see Health Check Overview.If the parameter is set to
CLB
, the scaling group will check both the network status and the CLB health check status. If the network check indicates unhealthy, theHealthStatus
field will returnUNHEALTHY
. If the CLB health check indicates unhealthy, theHealthStatus
field will returnCLB_UNHEALTHY
. If both checks indicate unhealthy, theHealthStatus
field will returnUNHEALTHY|CLB_UNHEALTHY
. Default value:CLB
. - instance
Count Number - Instance number of a scaling group.
- lb
Health NumberCheck Grace Period - Grace period of the CLB health check during which the
IN_SERVICE
instances added will not be marked asCLB_UNHEALTHY
.Valid range: 0-7200, in seconds. Default value:0
. - load
Balancer List<String>Ids - ID list of traditional load balancers.
- max
Size Number - Maximum number of CVM instances. Valid value ranges: (0~2000).
- min
Size Number - Minimum number of CVM instances. Valid value ranges: (0~2000).
- multi
Zone StringSubnet Policy - Multi zone or subnet strategy, Valid values: PRIORITY and EQUALITY.
- project
Id Number - Specifies to which project the scaling group belongs.
- replace
Load BooleanBalancer Unhealthy - Enable unhealthy instance replacement. If set to
true
, AS will replace instances that are found unhealthy in the CLB health check. - replace
Mode String - Replace mode of unhealthy replacement service. Valid values: RECREATE: Rebuild an instance to replace the original unhealthy instance. RESET: Performing a system reinstallation on unhealthy instances to keep information such as data disks, private IP addresses, and instance IDs unchanged. The instance login settings, HostName, enhanced services, and UserData will remain consistent with the current launch configuration. Default value: RECREATE. Note: This field may return null, indicating that no valid values can be obtained.
- replace
Monitor BooleanUnhealthy - Enables unhealthy instance replacement. If set to
true
, AS will replace instances that are flagged as unhealthy by Cloud Monitor. - retry
Policy String - Available values for retry policies. Valid values: IMMEDIATE_RETRY and INCREMENTAL_INTERVALS.
- scaling
Group StringName - Name of a scaling group.
- scaling
Mode String - Indicates scaling mode which creates and terminates instances (classic method), or method first tries to start stopped instances (wake up stopped) to perform scaling operations. Available values:
CLASSIC_SCALING
,WAKE_UP_STOPPED_SCALING
. Default:CLASSIC_SCALING
. - status String
- Current status of a scaling group.
- subnet
Ids List<String> - ID list of subnet, and for VPC it is required.
- Map<String>
- Tags of a scaling group.
- termination
Policies List<String> - Available values for termination policies. Valid values: OLDEST_INSTANCE and NEWEST_INSTANCE.
- vpc
Id String - ID of VPC network.
- zones List<String>
- List of available zones, for Basic network it is required.
Supporting Types
AsScalingGroupForwardBalancerId, AsScalingGroupForwardBalancerIdArgs
- Listener
Id string - Listener ID for application load balancers.
- Load
Balancer stringId - ID of available load balancers.
- Target
Attributes List<AsScaling Group Forward Balancer Id Target Attribute> - Attribute list of target rules.
- Rule
Id string - ID of forwarding rules.
- Listener
Id string - Listener ID for application load balancers.
- Load
Balancer stringId - ID of available load balancers.
- Target
Attributes []AsScaling Group Forward Balancer Id Target Attribute - Attribute list of target rules.
- Rule
Id string - ID of forwarding rules.
- listener
Id String - Listener ID for application load balancers.
- load
Balancer StringId - ID of available load balancers.
- target
Attributes List<AsScaling Group Forward Balancer Id Target Attribute> - Attribute list of target rules.
- rule
Id String - ID of forwarding rules.
- listener
Id string - Listener ID for application load balancers.
- load
Balancer stringId - ID of available load balancers.
- target
Attributes AsScaling Group Forward Balancer Id Target Attribute[] - Attribute list of target rules.
- rule
Id string - ID of forwarding rules.
- listener_
id str - Listener ID for application load balancers.
- load_
balancer_ strid - ID of available load balancers.
- target_
attributes Sequence[AsScaling Group Forward Balancer Id Target Attribute] - Attribute list of target rules.
- rule_
id str - ID of forwarding rules.
- listener
Id String - Listener ID for application load balancers.
- load
Balancer StringId - ID of available load balancers.
- target
Attributes List<Property Map> - Attribute list of target rules.
- rule
Id String - ID of forwarding rules.
AsScalingGroupForwardBalancerIdTargetAttribute, AsScalingGroupForwardBalancerIdTargetAttributeArgs
Import
AutoScaling Groups can be imported using the id, e.g.
$ pulumi import tencentcloud:index/asScalingGroup:AsScalingGroup example asg-n32ymck2
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.