AWS Classic v5.41.0, May 15 23
AWS Classic v5.41.0, May 15 23
aws.autoscaling.Group
Explore with Pulumi AI
Provides an Auto Scaling Group resource.
Note: You must specify either
launch_configuration
,launch_template
, ormixed_instances_policy
.
NOTE on Auto Scaling Groups and ASG Attachments: This provider currently provides both a standalone
aws.autoscaling.Attachment
resource (describing an ASG attached to an ELB or ALB), and anaws.autoscaling.Group
withload_balancers
andtarget_group_arns
defined in-line. These two methods are not mutually-exclusive. Ifaws.autoscaling.Attachment
resources are used, either alone or with inlineload_balancers
ortarget_group_arns
, theaws.autoscaling.Group
resource must be configured to ignore changes to theload_balancers
andtarget_group_arns
arguments.
Waiting for Capacity
A newly-created ASG is initially empty and begins to scale to min_size
(or
desired_capacity
, if specified) by launching instances using the provided
Launch Configuration. These instances take time to launch and boot.
On ASG Update, changes to these values also take time to result in the target number of instances providing service.
This provider provides two mechanisms to help consistently manage ASG scale up time across dependent resources.
Waiting for ASG Capacity
The first is default behavior. This provider waits after ASG creation for
min_size
(or desired_capacity
, if specified) healthy instances to show up
in the ASG before continuing.
If min_size
or desired_capacity
are changed in a subsequent update,
this provider will also wait for the correct number of healthy instances before
continuing.
This provider considers an instance “healthy” when the ASG reports HealthStatus: "Healthy"
and LifecycleState: "InService"
. See the AWS AutoScaling
Docs
for more information on an ASG’s lifecycle.
This provider will wait for healthy instances for up to
wait_for_capacity_timeout
. If ASG creation is taking more than a few minutes,
it’s worth investigating for scaling activity errors, which can be caused by
problems with the selected Launch Configuration.
Setting wait_for_capacity_timeout
to "0"
disables ASG Capacity waiting.
Waiting for ELB Capacity
The second mechanism is optional, and affects ASGs with attached ELBs specified
via the load_balancers
attribute or with ALBs specified with target_group_arns
.
The min_elb_capacity
parameter causes the provider to wait for at least the
requested number of instances to show up "InService"
in all attached ELBs
during ASG creation. It has no effect on ASG updates.
If wait_for_elb_capacity
is set, the provider will wait for exactly that number
of Instances to be "InService"
in all attached ELBs on both creation and
updates.
These parameters can be used to ensure that service is being provided before the provider moves on. If new instances don’t pass the ELB’s health checks for any reason, the apply will time out, and the ASG will be marked as tainted (i.e., marked to be destroyed in a follow up run).
As with ASG Capacity, the provider will wait for up to wait_for_capacity_timeout
for the proper number of instances to be healthy.
Troubleshooting Capacity Waiting Timeouts
If ASG creation takes more than a few minutes, this could indicate one of a number of configuration problems. See the AWS Docs on Load Balancer Troubleshooting for more information.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var foobar = new Aws.Ec2.LaunchTemplate("foobar", new()
{
NamePrefix = "foobar",
ImageId = "ami-1a2b3c",
InstanceType = "t2.micro",
});
var bar = new Aws.AutoScaling.Group("bar", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 1,
MinSize = 1,
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupLaunchTemplateArgs
{
Id = foobar.Id,
Version = "$Latest",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foobar, err := ec2.NewLaunchTemplate(ctx, "foobar", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("foobar"),
ImageId: pulumi.String("ami-1a2b3c"),
InstanceType: pulumi.String("t2.micro"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(1),
MinSize: pulumi.Int(1),
LaunchTemplate: &autoscaling.GroupLaunchTemplateArgs{
Id: foobar.ID(),
Version: pulumi.String("$Latest"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.PlacementGroup;
import com.pulumi.aws.ec2.PlacementGroupArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInitialLifecycleHookArgs;
import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 test = new PlacementGroup("test", PlacementGroupArgs.builder()
.strategy("cluster")
.build());
var bar = new Group("bar", GroupArgs.builder()
.maxSize(5)
.minSize(2)
.healthCheckGracePeriod(300)
.healthCheckType("ELB")
.desiredCapacity(4)
.forceDelete(true)
.placementGroup(test.id())
.launchConfiguration(aws_launch_configuration.foobar().name())
.vpcZoneIdentifiers(
aws_subnet.example1().id(),
aws_subnet.example2().id())
.initialLifecycleHooks(GroupInitialLifecycleHookArgs.builder()
.name("foobar")
.defaultResult("CONTINUE")
.heartbeatTimeout(2000)
.lifecycleTransition("autoscaling:EC2_INSTANCE_LAUNCHING")
.notificationMetadata(serializeJson(
jsonObject(
jsonProperty("foo", "bar")
)))
.notificationTargetArn("arn:aws:sqs:us-east-1:444455556666:queue1*")
.roleArn("arn:aws:iam::123456789012:role/S3Access")
.build())
.tags(
GroupTagArgs.builder()
.key("foo")
.value("bar")
.propagateAtLaunch(true)
.build(),
GroupTagArgs.builder()
.key("lorem")
.value("ipsum")
.propagateAtLaunch(false)
.build())
.timeouts(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
}
}
import pulumi
import pulumi_aws as aws
foobar = aws.ec2.LaunchTemplate("foobar",
name_prefix="foobar",
image_id="ami-1a2b3c",
instance_type="t2.micro")
bar = aws.autoscaling.Group("bar",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=1,
min_size=1,
launch_template=aws.autoscaling.GroupLaunchTemplateArgs(
id=foobar.id,
version="$Latest",
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foobar = new aws.ec2.LaunchTemplate("foobar", {
namePrefix: "foobar",
imageId: "ami-1a2b3c",
instanceType: "t2.micro",
});
const bar = new aws.autoscaling.Group("bar", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 1,
minSize: 1,
launchTemplate: {
id: foobar.id,
version: "$Latest",
},
});
resources:
test:
type: aws:ec2:PlacementGroup
properties:
strategy: cluster
bar:
type: aws:autoscaling:Group
properties:
maxSize: 5
minSize: 2
healthCheckGracePeriod: 300
healthCheckType: ELB
desiredCapacity: 4
forceDelete: true
placementGroup: ${test.id}
launchConfiguration: ${aws_launch_configuration.foobar.name}
vpcZoneIdentifiers:
- ${aws_subnet.example1.id}
- ${aws_subnet.example2.id}
initialLifecycleHooks:
- name: foobar
defaultResult: CONTINUE
heartbeatTimeout: 2000
lifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
notificationMetadata:
fn::toJSON:
foo: bar
notificationTargetArn: arn:aws:sqs:us-east-1:444455556666:queue1*
roleArn: arn:aws:iam::123456789012:role/S3Access
tags:
- key: foo
value: bar
propagateAtLaunch: true
- key: lorem
value: ipsum
propagateAtLaunch: false
timeouts:
- delete: 15m
With Latest Version Of Launch Template
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
NamePrefix = "example",
ImageId = data.Aws_ami.Example.Id,
InstanceType = "c5.large",
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 1,
MinSize = 1,
MixedInstancesPolicy = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyArgs
{
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateArgs
{
LaunchTemplateSpecification = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs
{
LaunchTemplateId = exampleLaunchTemplate.Id,
},
Overrides = new[]
{
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c4.large",
WeightedCapacity = "3",
},
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c3.large",
WeightedCapacity = "2",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example"),
ImageId: pulumi.Any(data.Aws_ami.Example.Id),
InstanceType: pulumi.String("c5.large"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(1),
MinSize: pulumi.Int(1),
MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{
LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{
LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{
LaunchTemplateId: exampleLaunchTemplate.ID(),
},
Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c4.large"),
WeightedCapacity: pulumi.String("3"),
},
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c3.large"),
WeightedCapacity: pulumi.String("2"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
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 foobar = new LaunchTemplate("foobar", LaunchTemplateArgs.builder()
.namePrefix("foobar")
.imageId("ami-1a2b3c")
.instanceType("t2.micro")
.build());
var bar = new Group("bar", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.launchTemplate(GroupLaunchTemplateArgs.builder()
.id(foobar.id())
.version("$Latest")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
name_prefix="example",
image_id=data["aws_ami"]["example"]["id"],
instance_type="c5.large")
example_group = aws.autoscaling.Group("exampleGroup",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=1,
min_size=1,
mixed_instances_policy=aws.autoscaling.GroupMixedInstancesPolicyArgs(
launch_template=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs(
launch_template_specification=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs(
launch_template_id=example_launch_template.id,
),
overrides=[
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c4.large",
weighted_capacity="3",
),
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c3.large",
weighted_capacity="2",
),
],
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
namePrefix: "example",
imageId: data.aws_ami.example.id,
instanceType: "c5.large",
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 1,
minSize: 1,
mixedInstancesPolicy: {
launchTemplate: {
launchTemplateSpecification: {
launchTemplateId: exampleLaunchTemplate.id,
},
overrides: [
{
instanceType: "c4.large",
weightedCapacity: "3",
},
{
instanceType: "c3.large",
weightedCapacity: "2",
},
],
},
},
});
resources:
foobar:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: foobar
imageId: ami-1a2b3c
instanceType: t2.micro
bar:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 1
minSize: 1
launchTemplate:
id: ${foobar.id}
version: $Latest
Mixed Instances Policy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
NamePrefix = "example",
ImageId = data.Aws_ami.Example.Id,
InstanceType = "c5.large",
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
CapacityRebalance = true,
DesiredCapacity = 12,
MaxSize = 15,
MinSize = 12,
VpcZoneIdentifiers = new[]
{
aws_subnet.Example1.Id,
aws_subnet.Example2.Id,
},
MixedInstancesPolicy = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyArgs
{
InstancesDistribution = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyInstancesDistributionArgs
{
OnDemandBaseCapacity = 0,
OnDemandPercentageAboveBaseCapacity = 25,
SpotAllocationStrategy = "capacity-optimized",
},
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateArgs
{
LaunchTemplateSpecification = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs
{
LaunchTemplateId = exampleLaunchTemplate.Id,
},
Overrides = new[]
{
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c4.large",
WeightedCapacity = "3",
},
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c3.large",
WeightedCapacity = "2",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example"),
ImageId: pulumi.Any(data.Aws_ami.Example.Id),
InstanceType: pulumi.String("c5.large"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
CapacityRebalance: pulumi.Bool(true),
DesiredCapacity: pulumi.Int(12),
MaxSize: pulumi.Int(15),
MinSize: pulumi.Int(12),
VpcZoneIdentifiers: pulumi.StringArray{
aws_subnet.Example1.Id,
aws_subnet.Example2.Id,
},
MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{
InstancesDistribution: &autoscaling.GroupMixedInstancesPolicyInstancesDistributionArgs{
OnDemandBaseCapacity: pulumi.Int(0),
OnDemandPercentageAboveBaseCapacity: pulumi.Int(25),
SpotAllocationStrategy: pulumi.String("capacity-optimized"),
},
LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{
LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{
LaunchTemplateId: exampleLaunchTemplate.ID(),
},
Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c4.large"),
WeightedCapacity: pulumi.String("3"),
},
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c3.large"),
WeightedCapacity: pulumi.String("2"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
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 exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c3.large")
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
name_prefix="example",
image_id=data["aws_ami"]["example"]["id"],
instance_type="c5.large")
example_group = aws.autoscaling.Group("exampleGroup",
capacity_rebalance=True,
desired_capacity=12,
max_size=15,
min_size=12,
vpc_zone_identifiers=[
aws_subnet["example1"]["id"],
aws_subnet["example2"]["id"],
],
mixed_instances_policy=aws.autoscaling.GroupMixedInstancesPolicyArgs(
instances_distribution=aws.autoscaling.GroupMixedInstancesPolicyInstancesDistributionArgs(
on_demand_base_capacity=0,
on_demand_percentage_above_base_capacity=25,
spot_allocation_strategy="capacity-optimized",
),
launch_template=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs(
launch_template_specification=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs(
launch_template_id=example_launch_template.id,
),
overrides=[
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c4.large",
weighted_capacity="3",
),
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c3.large",
weighted_capacity="2",
),
],
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
namePrefix: "example",
imageId: data.aws_ami.example.id,
instanceType: "c5.large",
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
capacityRebalance: true,
desiredCapacity: 12,
maxSize: 15,
minSize: 12,
vpcZoneIdentifiers: [
aws_subnet.example1.id,
aws_subnet.example2.id,
],
mixedInstancesPolicy: {
instancesDistribution: {
onDemandBaseCapacity: 0,
onDemandPercentageAboveBaseCapacity: 25,
spotAllocationStrategy: "capacity-optimized",
},
launchTemplate: {
launchTemplateSpecification: {
launchTemplateId: exampleLaunchTemplate.id,
},
overrides: [
{
instanceType: "c4.large",
weightedCapacity: "3",
},
{
instanceType: "c3.large",
weightedCapacity: "2",
},
],
},
},
});
resources:
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example
imageId: ${data.aws_ami.example.id}
instanceType: c5.large
exampleGroup:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 1
minSize: 1
mixedInstancesPolicy:
launchTemplate:
launchTemplateSpecification:
launchTemplateId: ${exampleLaunchTemplate.id}
overrides:
- instanceType: c4.large
weightedCapacity: '3'
- instanceType: c3.large
weightedCapacity: '2'
Mixed Instances Policy with Spot Instances and Capacity Rebalance
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
NamePrefix = "example",
ImageId = data.Aws_ami.Example.Id,
InstanceType = "c5.large",
});
var example2 = new Aws.Ec2.LaunchTemplate("example2", new()
{
NamePrefix = "example2",
ImageId = data.Aws_ami.Example2.Id,
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 1,
MinSize = 1,
MixedInstancesPolicy = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyArgs
{
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateArgs
{
LaunchTemplateSpecification = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs
{
LaunchTemplateId = exampleLaunchTemplate.Id,
},
Overrides = new[]
{
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c4.large",
WeightedCapacity = "3",
},
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceType = "c6g.large",
LaunchTemplateSpecification = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs
{
LaunchTemplateId = example2.Id,
},
WeightedCapacity = "2",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example"),
ImageId: pulumi.Any(data.Aws_ami.Example.Id),
InstanceType: pulumi.String("c5.large"),
})
if err != nil {
return err
}
example2, err := ec2.NewLaunchTemplate(ctx, "example2", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example2"),
ImageId: pulumi.Any(data.Aws_ami.Example2.Id),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(1),
MinSize: pulumi.Int(1),
MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{
LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{
LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{
LaunchTemplateId: exampleLaunchTemplate.ID(),
},
Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c4.large"),
WeightedCapacity: pulumi.String("3"),
},
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceType: pulumi.String("c6g.large"),
LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs{
LaunchTemplateId: example2.ID(),
},
WeightedCapacity: pulumi.String("2"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyInstancesDistributionArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
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 exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.capacityRebalance(true)
.desiredCapacity(12)
.maxSize(15)
.minSize(12)
.vpcZoneIdentifiers(
aws_subnet.example1().id(),
aws_subnet.example2().id())
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.instancesDistribution(GroupMixedInstancesPolicyInstancesDistributionArgs.builder()
.onDemandBaseCapacity(0)
.onDemandPercentageAboveBaseCapacity(25)
.spotAllocationStrategy("capacity-optimized")
.build())
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c3.large")
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
name_prefix="example",
image_id=data["aws_ami"]["example"]["id"],
instance_type="c5.large")
example2 = aws.ec2.LaunchTemplate("example2",
name_prefix="example2",
image_id=data["aws_ami"]["example2"]["id"])
example_group = aws.autoscaling.Group("exampleGroup",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=1,
min_size=1,
mixed_instances_policy=aws.autoscaling.GroupMixedInstancesPolicyArgs(
launch_template=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs(
launch_template_specification=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs(
launch_template_id=example_launch_template.id,
),
overrides=[
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c4.large",
weighted_capacity="3",
),
aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_type="c6g.large",
launch_template_specification=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs(
launch_template_id=example2.id,
),
weighted_capacity="2",
),
],
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
namePrefix: "example",
imageId: data.aws_ami.example.id,
instanceType: "c5.large",
});
const example2 = new aws.ec2.LaunchTemplate("example2", {
namePrefix: "example2",
imageId: data.aws_ami.example2.id,
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 1,
minSize: 1,
mixedInstancesPolicy: {
launchTemplate: {
launchTemplateSpecification: {
launchTemplateId: exampleLaunchTemplate.id,
},
overrides: [
{
instanceType: "c4.large",
weightedCapacity: "3",
},
{
instanceType: "c6g.large",
launchTemplateSpecification: {
launchTemplateId: example2.id,
},
weightedCapacity: "2",
},
],
},
},
});
resources:
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example
imageId: ${data.aws_ami.example.id}
instanceType: c5.large
exampleGroup:
type: aws:autoscaling:Group
properties:
capacityRebalance: true
desiredCapacity: 12
maxSize: 15
minSize: 12
vpcZoneIdentifiers:
- ${aws_subnet.example1.id}
- ${aws_subnet.example2.id}
mixedInstancesPolicy:
instancesDistribution:
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 25
spotAllocationStrategy: capacity-optimized
launchTemplate:
launchTemplateSpecification:
launchTemplateId: ${exampleLaunchTemplate.id}
overrides:
- instanceType: c4.large
weightedCapacity: '3'
- instanceType: c3.large
weightedCapacity: '2'
Mixed Instances Policy with Instance level LaunchTemplateSpecification Overrides
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
NamePrefix = "example",
ImageId = data.Aws_ami.Example.Id,
InstanceType = "c5.large",
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 1,
MinSize = 1,
MixedInstancesPolicy = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyArgs
{
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateArgs
{
LaunchTemplateSpecification = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs
{
LaunchTemplateId = exampleLaunchTemplate.Id,
},
Overrides = new[]
{
new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs
{
InstanceRequirements = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs
{
MemoryMib = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs
{
Min = 1000,
},
VcpuCount = new Aws.AutoScaling.Inputs.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs
{
Min = 4,
},
},
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example"),
ImageId: pulumi.Any(data.Aws_ami.Example.Id),
InstanceType: pulumi.String("c5.large"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(1),
MinSize: pulumi.Int(1),
MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{
LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{
LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{
LaunchTemplateId: exampleLaunchTemplate.ID(),
},
Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{
&autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{
InstanceRequirements: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs{
MemoryMib: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs{
Min: pulumi.Int(1000),
},
VcpuCount: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs{
Min: pulumi.Int(4),
},
},
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
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 exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var example2 = new LaunchTemplate("example2", LaunchTemplateArgs.builder()
.namePrefix("example2")
.imageId(data.aws_ami().example2().id())
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c6g.large")
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(example2.id())
.build())
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
name_prefix="example",
image_id=data["aws_ami"]["example"]["id"],
instance_type="c5.large")
example_group = aws.autoscaling.Group("exampleGroup",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=1,
min_size=1,
mixed_instances_policy=aws.autoscaling.GroupMixedInstancesPolicyArgs(
launch_template=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs(
launch_template_specification=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs(
launch_template_id=example_launch_template.id,
),
overrides=[aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs(
instance_requirements=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs(
memory_mib=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs(
min=1000,
),
vcpu_count=aws.autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs(
min=4,
),
),
)],
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
namePrefix: "example",
imageId: data.aws_ami.example.id,
instanceType: "c5.large",
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 1,
minSize: 1,
mixedInstancesPolicy: {
launchTemplate: {
launchTemplateSpecification: {
launchTemplateId: exampleLaunchTemplate.id,
},
overrides: [{
instanceRequirements: {
memoryMib: {
min: 1000,
},
vcpuCount: {
min: 4,
},
},
}],
},
},
});
resources:
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example
imageId: ${data.aws_ami.example.id}
instanceType: c5.large
example2:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example2
imageId: ${data.aws_ami.example2.id}
exampleGroup:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 1
minSize: 1
mixedInstancesPolicy:
launchTemplate:
launchTemplateSpecification:
launchTemplateId: ${exampleLaunchTemplate.id}
overrides:
- instanceType: c4.large
weightedCapacity: '3'
- instanceType: c6g.large
launchTemplateSpecification:
launchTemplateId: ${example2.id}
weightedCapacity: '2'
Mixed Instances Policy with Attribute-based Instance Type Selection
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleAmi = Aws.Ec2.GetAmi.Invoke(new()
{
MostRecent = true,
Owners = new[]
{
"amazon",
},
Filters = new[]
{
new Aws.Ec2.Inputs.GetAmiFilterInputArgs
{
Name = "name",
Values = new[]
{
"amzn-ami-hvm-*-x86_64-gp2",
},
},
},
});
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
ImageId = exampleAmi.Apply(getAmiResult => getAmiResult.Id),
InstanceType = "t3.nano",
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 2,
MinSize = 1,
LaunchTemplate = new Aws.AutoScaling.Inputs.GroupLaunchTemplateArgs
{
Id = exampleLaunchTemplate.Id,
Version = exampleLaunchTemplate.LatestVersion,
},
Tags = new[]
{
new Aws.AutoScaling.Inputs.GroupTagArgs
{
Key = "Key",
Value = "Value",
PropagateAtLaunch = true,
},
},
InstanceRefresh = new Aws.AutoScaling.Inputs.GroupInstanceRefreshArgs
{
Strategy = "Rolling",
Preferences = new Aws.AutoScaling.Inputs.GroupInstanceRefreshPreferencesArgs
{
MinHealthyPercentage = 50,
},
Triggers = new[]
{
"tag",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleAmi, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
MostRecent: pulumi.BoolRef(true),
Owners: []string{
"amazon",
},
Filters: []ec2.GetAmiFilter{
{
Name: "name",
Values: []string{
"amzn-ami-hvm-*-x86_64-gp2",
},
},
},
}, nil)
if err != nil {
return err
}
exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
ImageId: *pulumi.String(exampleAmi.Id),
InstanceType: pulumi.String("t3.nano"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(2),
MinSize: pulumi.Int(1),
LaunchTemplate: &autoscaling.GroupLaunchTemplateArgs{
Id: exampleLaunchTemplate.ID(),
Version: exampleLaunchTemplate.LatestVersion,
},
Tags: autoscaling.GroupTagArray{
&autoscaling.GroupTagArgs{
Key: pulumi.String("Key"),
Value: pulumi.String("Value"),
PropagateAtLaunch: pulumi.Bool(true),
},
},
InstanceRefresh: &autoscaling.GroupInstanceRefreshArgs{
Strategy: pulumi.String("Rolling"),
Preferences: &autoscaling.GroupInstanceRefreshPreferencesArgs{
MinHealthyPercentage: pulumi.Int(50),
},
Triggers: pulumi.StringArray{
pulumi.String("tag"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
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 exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceRequirements(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs.builder()
.memoryMib(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs.builder()
.min(1000)
.build())
.vcpuCount(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs.builder()
.min(4)
.build())
.build())
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_ami = aws.ec2.get_ami(most_recent=True,
owners=["amazon"],
filters=[aws.ec2.GetAmiFilterArgs(
name="name",
values=["amzn-ami-hvm-*-x86_64-gp2"],
)])
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
image_id=example_ami.id,
instance_type="t3.nano")
example_group = aws.autoscaling.Group("exampleGroup",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=2,
min_size=1,
launch_template=aws.autoscaling.GroupLaunchTemplateArgs(
id=example_launch_template.id,
version=example_launch_template.latest_version,
),
tags=[aws.autoscaling.GroupTagArgs(
key="Key",
value="Value",
propagate_at_launch=True,
)],
instance_refresh=aws.autoscaling.GroupInstanceRefreshArgs(
strategy="Rolling",
preferences=aws.autoscaling.GroupInstanceRefreshPreferencesArgs(
min_healthy_percentage=50,
),
triggers=["tag"],
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleAmi = aws.ec2.getAmi({
mostRecent: true,
owners: ["amazon"],
filters: [{
name: "name",
values: ["amzn-ami-hvm-*-x86_64-gp2"],
}],
});
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
imageId: exampleAmi.then(exampleAmi => exampleAmi.id),
instanceType: "t3.nano",
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 2,
minSize: 1,
launchTemplate: {
id: exampleLaunchTemplate.id,
version: exampleLaunchTemplate.latestVersion,
},
tags: [{
key: "Key",
value: "Value",
propagateAtLaunch: true,
}],
instanceRefresh: {
strategy: "Rolling",
preferences: {
minHealthyPercentage: 50,
},
triggers: ["tag"],
},
});
resources:
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example
imageId: ${data.aws_ami.example.id}
instanceType: c5.large
exampleGroup:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 1
minSize: 1
mixedInstancesPolicy:
launchTemplate:
launchTemplateSpecification:
launchTemplateId: ${exampleLaunchTemplate.id}
overrides:
- instanceRequirements:
memoryMib:
min: 1000
vcpuCount:
min: 4
Automatically refresh all instances after the group is updated
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new()
{
NamePrefix = "example",
ImageId = data.Aws_ami.Example.Id,
InstanceType = "c5.large",
});
var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new()
{
AvailabilityZones = new[]
{
"us-east-1a",
},
DesiredCapacity = 1,
MaxSize = 5,
MinSize = 1,
WarmPool = new Aws.AutoScaling.Inputs.GroupWarmPoolArgs
{
PoolState = "Hibernated",
MinSize = 1,
MaxGroupPreparedCapacity = 10,
InstanceReusePolicy = new Aws.AutoScaling.Inputs.GroupWarmPoolInstanceReusePolicyArgs
{
ReuseOnScaleIn = true,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/autoscaling"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
NamePrefix: pulumi.String("example"),
ImageId: pulumi.Any(data.Aws_ami.Example.Id),
InstanceType: pulumi.String("c5.large"),
})
if err != nil {
return err
}
_, err = autoscaling.NewGroup(ctx, "exampleGroup", &autoscaling.GroupArgs{
AvailabilityZones: pulumi.StringArray{
pulumi.String("us-east-1a"),
},
DesiredCapacity: pulumi.Int(1),
MaxSize: pulumi.Int(5),
MinSize: pulumi.Int(1),
WarmPool: &autoscaling.GroupWarmPoolArgs{
PoolState: pulumi.String("Hibernated"),
MinSize: pulumi.Int(1),
MaxGroupPreparedCapacity: pulumi.Int(10),
InstanceReusePolicy: &autoscaling.GroupWarmPoolInstanceReusePolicyArgs{
ReuseOnScaleIn: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetAmiArgs;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshPreferencesArgs;
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 exampleAmi = Ec2Functions.getAmi(GetAmiArgs.builder()
.mostRecent(true)
.owners("amazon")
.filters(GetAmiFilterArgs.builder()
.name("name")
.values("amzn-ami-hvm-*-x86_64-gp2")
.build())
.build());
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.imageId(exampleAmi.applyValue(getAmiResult -> getAmiResult.id()))
.instanceType("t3.nano")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(2)
.minSize(1)
.launchTemplate(GroupLaunchTemplateArgs.builder()
.id(exampleLaunchTemplate.id())
.version(exampleLaunchTemplate.latestVersion())
.build())
.tags(GroupTagArgs.builder()
.key("Key")
.value("Value")
.propagateAtLaunch(true)
.build())
.instanceRefresh(GroupInstanceRefreshArgs.builder()
.strategy("Rolling")
.preferences(GroupInstanceRefreshPreferencesArgs.builder()
.minHealthyPercentage(50)
.build())
.triggers("tag")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
name_prefix="example",
image_id=data["aws_ami"]["example"]["id"],
instance_type="c5.large")
example_group = aws.autoscaling.Group("exampleGroup",
availability_zones=["us-east-1a"],
desired_capacity=1,
max_size=5,
min_size=1,
warm_pool=aws.autoscaling.GroupWarmPoolArgs(
pool_state="Hibernated",
min_size=1,
max_group_prepared_capacity=10,
instance_reuse_policy=aws.autoscaling.GroupWarmPoolInstanceReusePolicyArgs(
reuse_on_scale_in=True,
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("exampleLaunchTemplate", {
namePrefix: "example",
imageId: data.aws_ami.example.id,
instanceType: "c5.large",
});
const exampleGroup = new aws.autoscaling.Group("exampleGroup", {
availabilityZones: ["us-east-1a"],
desiredCapacity: 1,
maxSize: 5,
minSize: 1,
warmPool: {
poolState: "Hibernated",
minSize: 1,
maxGroupPreparedCapacity: 10,
instanceReusePolicy: {
reuseOnScaleIn: true,
},
},
});
resources:
exampleGroup:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 2
minSize: 1
launchTemplate:
id: ${exampleLaunchTemplate.id}
version: ${exampleLaunchTemplate.latestVersion}
tags:
- key: Key
value: Value
propagateAtLaunch: true
instanceRefresh:
strategy: Rolling
preferences:
minHealthyPercentage: 50
triggers:
- tag
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
imageId: ${exampleAmi.id}
instanceType: t3.nano
variables:
exampleAmi:
fn::invoke:
Function: aws:ec2:getAmi
Arguments:
mostRecent: true
owners:
- amazon
filters:
- name: name
values:
- amzn-ami-hvm-*-x86_64-gp2
Auto Scaling group with Warm Pool
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolArgs;
import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolInstanceReusePolicyArgs;
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 exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(5)
.minSize(1)
.warmPool(GroupWarmPoolArgs.builder()
.poolState("Hibernated")
.minSize(1)
.maxGroupPreparedCapacity(10)
.instanceReusePolicy(GroupWarmPoolInstanceReusePolicyArgs.builder()
.reuseOnScaleIn(true)
.build())
.build())
.build());
}
}
Coming soon!
Coming soon!
resources:
exampleLaunchTemplate:
type: aws:ec2:LaunchTemplate
properties:
namePrefix: example
imageId: ${data.aws_ami.example.id}
instanceType: c5.large
exampleGroup:
type: aws:autoscaling:Group
properties:
availabilityZones:
- us-east-1a
desiredCapacity: 1
maxSize: 5
minSize: 1
warmPool:
poolState: Hibernated
minSize: 1
maxGroupPreparedCapacity: 10
instanceReusePolicy:
reuseOnScaleIn: true
Create Group Resource
new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
@overload
def Group(resource_name: str,
opts: Optional[ResourceOptions] = None,
availability_zones: Optional[Sequence[str]] = None,
capacity_rebalance: Optional[bool] = None,
context: Optional[str] = None,
default_cooldown: Optional[int] = None,
default_instance_warmup: Optional[int] = None,
desired_capacity: Optional[int] = None,
desired_capacity_type: Optional[str] = None,
enabled_metrics: Optional[Sequence[str]] = None,
force_delete: Optional[bool] = None,
force_delete_warm_pool: Optional[bool] = None,
health_check_grace_period: Optional[int] = None,
health_check_type: Optional[str] = None,
initial_lifecycle_hooks: Optional[Sequence[GroupInitialLifecycleHookArgs]] = None,
instance_refresh: Optional[GroupInstanceRefreshArgs] = None,
launch_configuration: Optional[str] = None,
launch_template: Optional[GroupLaunchTemplateArgs] = None,
load_balancers: Optional[Sequence[str]] = None,
max_instance_lifetime: Optional[int] = None,
max_size: Optional[int] = None,
metrics_granularity: Optional[Union[str, MetricsGranularity]] = None,
min_elb_capacity: Optional[int] = None,
min_size: Optional[int] = None,
mixed_instances_policy: Optional[GroupMixedInstancesPolicyArgs] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
placement_group: Optional[str] = None,
protect_from_scale_in: Optional[bool] = None,
service_linked_role_arn: Optional[str] = None,
suspended_processes: Optional[Sequence[str]] = None,
tags: Optional[Sequence[GroupTagArgs]] = None,
tags_collection: Optional[Sequence[Mapping[str, str]]] = None,
target_group_arns: Optional[Sequence[str]] = None,
termination_policies: Optional[Sequence[str]] = None,
vpc_zone_identifiers: Optional[Sequence[str]] = None,
wait_for_capacity_timeout: Optional[str] = None,
wait_for_elb_capacity: Optional[int] = None,
warm_pool: Optional[GroupWarmPoolArgs] = None)
@overload
def Group(resource_name: str,
args: GroupArgs,
opts: Optional[ResourceOptions] = None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
type: aws:autoscaling:Group
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- 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 GroupArgs
- 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 GroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Group Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Group resource accepts the following input properties:
- Max
Size int Maximum size of the Auto Scaling Group.
- Min
Size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- Availability
Zones List<string> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- Capacity
Rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- Context string
Reserved.
- Default
Cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Default
Instance intWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- Desired
Capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- Enabled
Metrics List<string> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- Force
Delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- Force
Delete boolWarm Pool - Health
Check intGrace Period Time (in seconds) after instance comes into service before checking health.
- Health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- Initial
Lifecycle List<GroupHooks Initial Lifecycle Hook Args> One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- Instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- Launch
Configuration string | string Name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- Load
Balancers List<string> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- Max
Instance intLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- Metrics
Granularity string | Pulumi.Aws. Auto Scaling. Metrics Granularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- Min
Elb intCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- Mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- Placement
Group string | string Name of the placement group into which you'll launch your instances, if any.
- Protect
From boolScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- Service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes List<string> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Immutable
Dictionary<string, string>> Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- Target
Group List<string>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- Termination
Policies List<string> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- Vpc
Zone List<string>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- Wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- Wait
For intElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- Warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- Max
Size int Maximum size of the Auto Scaling Group.
- Min
Size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- Availability
Zones []string List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- Capacity
Rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- Context string
Reserved.
- Default
Cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Default
Instance intWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- Desired
Capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- Enabled
Metrics []string List of metrics to collect. The allowed values are defined by the underlying AWS API.
- Force
Delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- Force
Delete boolWarm Pool - Health
Check intGrace Period Time (in seconds) after instance comes into service before checking health.
- Health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- Initial
Lifecycle []GroupHooks Initial Lifecycle Hook Args One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- Instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- Launch
Configuration string | string Name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- Load
Balancers []string List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- Max
Instance intLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- Metrics
Granularity string | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- Min
Elb intCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- Mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- Placement
Group string | string Name of the placement group into which you'll launch your instances, if any.
- Protect
From boolScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- Service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes []string List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- []Group
Tag Args Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- []map[string]string
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- Target
Group []stringArns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- Termination
Policies []string List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- Vpc
Zone []stringIdentifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- Wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- Wait
For intElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- Warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- max
Size Integer Maximum size of the Auto Scaling Group.
- min
Size Integer Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- availability
Zones List<String> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance Boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context String
Reserved.
- default
Cooldown Integer Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance IntegerWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity Integer Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity StringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics List<String> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete Boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete BooleanWarm Pool - health
Check IntegerGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check StringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle List<GroupHooks Initial Lifecycle Hook Args> One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration String | String Name of the launch configuration to use.
- launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers List<String> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance IntegerLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- metrics
Granularity String | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb IntegerCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix String Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group String | String Name of the placement group into which you'll launch your instances, if any.
- protect
From BooleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked StringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes List<String> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Map<String,String>>
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group List<String>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies List<String> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone List<String>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For StringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For IntegerElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- max
Size number Maximum size of the Auto Scaling Group.
- min
Size number Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- availability
Zones string[] List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context string
Reserved.
- default
Cooldown number Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance numberWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity number Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics Metric[] List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete booleanWarm Pool - health
Check numberGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle GroupHooks Initial Lifecycle Hook Args[] One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration string | LaunchConfiguration Name of the launch configuration to use.
- launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers string[] List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance numberLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- metrics
Granularity string | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb numberCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group string | PlacementGroup Name of the placement group into which you'll launch your instances, if any.
- protect
From booleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes string[] List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- Group
Tag Args[] Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- {[key: string]: string}[]
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group string[]Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies string[] List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone string[]Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For numberElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- max_
size int Maximum size of the Auto Scaling Group.
- min_
size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- availability_
zones Sequence[str] List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity_
rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context str
Reserved.
- default_
cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default_
instance_ intwarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired_
capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired_
capacity_ strtype The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled_
metrics Sequence[str] List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force_
delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force_
delete_ boolwarm_ pool - health_
check_ intgrace_ period Time (in seconds) after instance comes into service before checking health.
- health_
check_ strtype "EC2" or "ELB". Controls how health checking is done.
- initial_
lifecycle_ Sequence[Grouphooks Initial Lifecycle Hook Args] One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance_
refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch_
configuration str | str Name of the launch configuration to use.
- launch_
template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load_
balancers Sequence[str] List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max_
instance_ intlifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- metrics_
granularity str | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min_
elb_ intcapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- mixed_
instances_ Grouppolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name str
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name_
prefix str Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement_
group str | str Name of the placement group into which you'll launch your instances, if any.
- protect_
from_ boolscale_ in Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service_
linked_ strrole_ arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended_
processes Sequence[str] List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- Sequence[Group
Tag Args] Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- Sequence[Mapping[str, str]]
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target_
group_ Sequence[str]arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination_
policies Sequence[str] List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc_
zone_ Sequence[str]identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait_
for_ strcapacity_ timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait_
for_ intelb_ capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm_
pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- max
Size Number Maximum size of the Auto Scaling Group.
- min
Size Number Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- availability
Zones List<String> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance Boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context String
Reserved.
- default
Cooldown Number Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance NumberWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity Number Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity StringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics List<> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete Boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete BooleanWarm Pool - health
Check NumberGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check StringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle List<Property Map>Hooks One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh Property Map If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration String | Name of the launch configuration to use.
- launch
Template Property Map Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers List<String> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance NumberLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- metrics
Granularity String | "1Minute" Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb NumberCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- mixed
Instances Property MapPolicy Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix String Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group String | Name of the placement group into which you'll launch your instances, if any.
- protect
From BooleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked StringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes List<String> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Property Map>
Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Map<String>>
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group List<String>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies List<String> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone List<String>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For StringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For NumberElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool Property Map If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
Outputs
All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:
- Arn string
ARN for this Auto Scaling Group
- Id string
The provider-assigned unique ID for this managed resource.
- Predicted
Capacity int Predicted capacity of the group.
- Warm
Pool intSize Current size of the warm pool.
- Arn string
ARN for this Auto Scaling Group
- Id string
The provider-assigned unique ID for this managed resource.
- Predicted
Capacity int Predicted capacity of the group.
- Warm
Pool intSize Current size of the warm pool.
- arn String
ARN for this Auto Scaling Group
- id String
The provider-assigned unique ID for this managed resource.
- predicted
Capacity Integer Predicted capacity of the group.
- warm
Pool IntegerSize Current size of the warm pool.
- arn string
ARN for this Auto Scaling Group
- id string
The provider-assigned unique ID for this managed resource.
- predicted
Capacity number Predicted capacity of the group.
- warm
Pool numberSize Current size of the warm pool.
- arn str
ARN for this Auto Scaling Group
- id str
The provider-assigned unique ID for this managed resource.
- predicted_
capacity int Predicted capacity of the group.
- warm_
pool_ intsize Current size of the warm pool.
- arn String
ARN for this Auto Scaling Group
- id String
The provider-assigned unique ID for this managed resource.
- predicted
Capacity Number Predicted capacity of the group.
- warm
Pool NumberSize Current size of the warm pool.
Look up Existing Group Resource
Get an existing Group 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?: GroupState, opts?: CustomResourceOptions): Group
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
availability_zones: Optional[Sequence[str]] = None,
capacity_rebalance: Optional[bool] = None,
context: Optional[str] = None,
default_cooldown: Optional[int] = None,
default_instance_warmup: Optional[int] = None,
desired_capacity: Optional[int] = None,
desired_capacity_type: Optional[str] = None,
enabled_metrics: Optional[Sequence[str]] = None,
force_delete: Optional[bool] = None,
force_delete_warm_pool: Optional[bool] = None,
health_check_grace_period: Optional[int] = None,
health_check_type: Optional[str] = None,
initial_lifecycle_hooks: Optional[Sequence[GroupInitialLifecycleHookArgs]] = None,
instance_refresh: Optional[GroupInstanceRefreshArgs] = None,
launch_configuration: Optional[str] = None,
launch_template: Optional[GroupLaunchTemplateArgs] = None,
load_balancers: Optional[Sequence[str]] = None,
max_instance_lifetime: Optional[int] = None,
max_size: Optional[int] = None,
metrics_granularity: Optional[Union[str, MetricsGranularity]] = None,
min_elb_capacity: Optional[int] = None,
min_size: Optional[int] = None,
mixed_instances_policy: Optional[GroupMixedInstancesPolicyArgs] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
placement_group: Optional[str] = None,
predicted_capacity: Optional[int] = None,
protect_from_scale_in: Optional[bool] = None,
service_linked_role_arn: Optional[str] = None,
suspended_processes: Optional[Sequence[str]] = None,
tags: Optional[Sequence[GroupTagArgs]] = None,
tags_collection: Optional[Sequence[Mapping[str, str]]] = None,
target_group_arns: Optional[Sequence[str]] = None,
termination_policies: Optional[Sequence[str]] = None,
vpc_zone_identifiers: Optional[Sequence[str]] = None,
wait_for_capacity_timeout: Optional[str] = None,
wait_for_elb_capacity: Optional[int] = None,
warm_pool: Optional[GroupWarmPoolArgs] = None,
warm_pool_size: Optional[int] = None) -> Group
func GetGroup(ctx *Context, name string, id IDInput, state *GroupState, opts ...ResourceOption) (*Group, error)
public static Group Get(string name, Input<string> id, GroupState? state, CustomResourceOptions? opts = null)
public static Group get(String name, Output<String> id, GroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Arn string
ARN for this Auto Scaling Group
- Availability
Zones List<string> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- Capacity
Rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- Context string
Reserved.
- Default
Cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Default
Instance intWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- Desired
Capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- Enabled
Metrics List<string> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- Force
Delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- Force
Delete boolWarm Pool - Health
Check intGrace Period Time (in seconds) after instance comes into service before checking health.
- Health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- Initial
Lifecycle List<GroupHooks Initial Lifecycle Hook Args> One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- Instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- Launch
Configuration string | string Name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- Load
Balancers List<string> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- Max
Instance intLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- Max
Size int Maximum size of the Auto Scaling Group.
- Metrics
Granularity string | Pulumi.Aws. Auto Scaling. Metrics Granularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- Min
Elb intCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- Min
Size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- Mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- Placement
Group string | string Name of the placement group into which you'll launch your instances, if any.
- Predicted
Capacity int Predicted capacity of the group.
- Protect
From boolScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- Service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes List<string> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Immutable
Dictionary<string, string>> Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- Target
Group List<string>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- Termination
Policies List<string> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- Vpc
Zone List<string>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- Wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- Wait
For intElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- Warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- Warm
Pool intSize Current size of the warm pool.
- Arn string
ARN for this Auto Scaling Group
- Availability
Zones []string List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- Capacity
Rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- Context string
Reserved.
- Default
Cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Default
Instance intWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- Desired
Capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- Enabled
Metrics []string List of metrics to collect. The allowed values are defined by the underlying AWS API.
- Force
Delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- Force
Delete boolWarm Pool - Health
Check intGrace Period Time (in seconds) after instance comes into service before checking health.
- Health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- Initial
Lifecycle []GroupHooks Initial Lifecycle Hook Args One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- Instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- Launch
Configuration string | string Name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- Load
Balancers []string List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- Max
Instance intLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- Max
Size int Maximum size of the Auto Scaling Group.
- Metrics
Granularity string | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- Min
Elb intCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- Min
Size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- Mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- Placement
Group string | string Name of the placement group into which you'll launch your instances, if any.
- Predicted
Capacity int Predicted capacity of the group.
- Protect
From boolScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- Service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes []string List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- []Group
Tag Args Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- []map[string]string
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- Target
Group []stringArns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- Termination
Policies []string List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- Vpc
Zone []stringIdentifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- Wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- Wait
For intElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- Warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- Warm
Pool intSize Current size of the warm pool.
- arn String
ARN for this Auto Scaling Group
- availability
Zones List<String> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance Boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context String
Reserved.
- default
Cooldown Integer Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance IntegerWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity Integer Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity StringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics List<String> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete Boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete BooleanWarm Pool - health
Check IntegerGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check StringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle List<GroupHooks Initial Lifecycle Hook Args> One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration String | String Name of the launch configuration to use.
- launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers List<String> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance IntegerLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- max
Size Integer Maximum size of the Auto Scaling Group.
- metrics
Granularity String | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb IntegerCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- min
Size Integer Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix String Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group String | String Name of the placement group into which you'll launch your instances, if any.
- predicted
Capacity Integer Predicted capacity of the group.
- protect
From BooleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked StringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes List<String> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Map<String,String>>
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group List<String>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies List<String> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone List<String>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For StringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For IntegerElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- warm
Pool IntegerSize Current size of the warm pool.
- arn string
ARN for this Auto Scaling Group
- availability
Zones string[] List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context string
Reserved.
- default
Cooldown number Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance numberWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity number Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity stringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics Metric[] List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete booleanWarm Pool - health
Check numberGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check stringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle GroupHooks Initial Lifecycle Hook Args[] One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration string | LaunchConfiguration Name of the launch configuration to use.
- launch
Template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers string[] List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance numberLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- max
Size number Maximum size of the Auto Scaling Group.
- metrics
Granularity string | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb numberCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- min
Size number Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- mixed
Instances GroupPolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group string | PlacementGroup Name of the placement group into which you'll launch your instances, if any.
- predicted
Capacity number Predicted capacity of the group.
- protect
From booleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked stringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes string[] List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- Group
Tag Args[] Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- {[key: string]: string}[]
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group string[]Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies string[] List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone string[]Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For stringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For numberElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- warm
Pool numberSize Current size of the warm pool.
- arn str
ARN for this Auto Scaling Group
- availability_
zones Sequence[str] List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity_
rebalance bool Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context str
Reserved.
- default_
cooldown int Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default_
instance_ intwarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired_
capacity int Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired_
capacity_ strtype The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled_
metrics Sequence[str] List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force_
delete bool Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force_
delete_ boolwarm_ pool - health_
check_ intgrace_ period Time (in seconds) after instance comes into service before checking health.
- health_
check_ strtype "EC2" or "ELB". Controls how health checking is done.
- initial_
lifecycle_ Sequence[Grouphooks Initial Lifecycle Hook Args] One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance_
refresh GroupInstance Refresh Args If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch_
configuration str | str Name of the launch configuration to use.
- launch_
template GroupLaunch Template Args Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load_
balancers Sequence[str] List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max_
instance_ intlifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- max_
size int Maximum size of the Auto Scaling Group.
- metrics_
granularity str | MetricsGranularity Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min_
elb_ intcapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- min_
size int Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- mixed_
instances_ Grouppolicy Mixed Instances Policy Args Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name str
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name_
prefix str Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement_
group str | str Name of the placement group into which you'll launch your instances, if any.
- predicted_
capacity int Predicted capacity of the group.
- protect_
from_ boolscale_ in Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service_
linked_ strrole_ arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended_
processes Sequence[str] List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- Sequence[Group
Tag Args] Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- Sequence[Mapping[str, str]]
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target_
group_ Sequence[str]arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination_
policies Sequence[str] List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc_
zone_ Sequence[str]identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait_
for_ strcapacity_ timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait_
for_ intelb_ capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm_
pool GroupWarm Pool Args If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- warm_
pool_ intsize Current size of the warm pool.
- arn String
ARN for this Auto Scaling Group
- availability
Zones List<String> List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with
vpc_zone_identifier
argument. Conflicts withvpc_zone_identifier
.- capacity
Rebalance Boolean Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
- context String
Reserved.
- default
Cooldown Number Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- default
Instance NumberWarmup Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)
- desired
Capacity Number Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- desired
Capacity StringType The unit of measurement for the value specified for
desired_capacity
. Supported for attribute-based instance type selection only. Valid values:"units"
,"vcpu"
,"memory-mib"
.- enabled
Metrics List<> List of metrics to collect. The allowed values are defined by the underlying AWS API.
- force
Delete Boolean Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.
- force
Delete BooleanWarm Pool - health
Check NumberGrace Period Time (in seconds) after instance comes into service before checking health.
- health
Check StringType "EC2" or "ELB". Controls how health checking is done.
- initial
Lifecycle List<Property Map>Hooks One or more Lifecycle Hooks to attach to the Auto Scaling Group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHook
resource, without theautoscaling_group_name
attribute. Please note that this will only work when creating a new Auto Scaling Group. For all other use-cases, please useaws.autoscaling.LifecycleHook
resource.- instance
Refresh Property Map If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
- launch
Configuration String | Name of the launch configuration to use.
- launch
Template Property Map Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.
- load
Balancers List<String> List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use
target_group_arns
instead.- max
Instance NumberLifetime Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds.
- max
Size Number Maximum size of the Auto Scaling Group.
- metrics
Granularity String | "1Minute" Granularity to associate with the metrics to collect. The only valid value is
1Minute
. Default is1Minute
.- min
Elb NumberCapacity Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)
- min
Size Number Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
- mixed
Instances Property MapPolicy Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.
- name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- name
Prefix String Creates a unique name beginning with the specified prefix. Conflicts with
name
.- placement
Group String | Name of the placement group into which you'll launch your instances, if any.
- predicted
Capacity Number Predicted capacity of the group.
- protect
From BooleanScale In Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
- service
Linked StringRole Arn ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes List<String> List of processes to suspend for the Auto Scaling Group. The allowed values are
Launch
,Terminate
,HealthCheck
,ReplaceUnhealthy
,AZRebalance
,AlarmNotification
,ScheduledActions
,AddToLoadBalancer
,InstanceRefresh
. Note that if you suspend either theLaunch
orTerminate
process types, it can prevent your Auto Scaling Group from functioning properly.- List<Property Map>
Configuration block(s) containing resource tags. Conflicts with
tags
. See Tag below for more details.- List<Map<String>>
Set of maps containing resource tags. Conflicts with
tag
. See Tags below for more details.Use tag instead
- target
Group List<String>Arns Set of
aws.alb.TargetGroup
ARNs, for use with Application or Network Load Balancing.- termination
Policies List<String> List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are
OldestInstance
,NewestInstance
,OldestLaunchConfiguration
,ClosestToNextInstanceHour
,OldestLaunchTemplate
,AllocationStrategy
,Default
. Additionally, the ARN of a Lambda function can be specified for custom termination policies.- vpc
Zone List<String>Identifiers List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with
availability_zones
.- wait
For StringCapacity Timeout Maximum duration that the provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to "0" causes the provider to skip all Capacity Waiting behavior.
- wait
For NumberElb Capacity Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over
min_elb_capacity
behavior.) (See also Waiting for Capacity below.)- warm
Pool Property Map If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below
- warm
Pool NumberSize Current size of the warm pool.
Supporting Types
GroupInitialLifecycleHook
- Lifecycle
Transition string - Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Default
Result string - Heartbeat
Timeout int - Notification
Metadata string - Notification
Target stringArn - Role
Arn string
- Lifecycle
Transition string - Name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- Default
Result string - Heartbeat
Timeout int - Notification
Metadata string - Notification
Target stringArn - Role
Arn string
- lifecycle
Transition String - name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- default
Result String - heartbeat
Timeout Integer - notification
Metadata String - notification
Target StringArn - role
Arn String
- lifecycle
Transition string - name string
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- default
Result string - heartbeat
Timeout number - notification
Metadata string - notification
Target stringArn - role
Arn string
- lifecycle_
transition str - name str
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- default_
result str - heartbeat_
timeout int - notification_
metadata str - notification_
target_ strarn - role_
arn str
- lifecycle
Transition String - name String
Name of the Auto Scaling Group. By default generated by the provider. Conflicts with
name_prefix
.- default
Result String - heartbeat
Timeout Number - notification
Metadata String - notification
Target StringArn - role
Arn String
GroupInstanceRefresh
- Strategy string
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- Preferences
Group
Instance Refresh Preferences Override default parameters for Instance Refresh.
- Triggers List<string>
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
- Strategy string
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- Preferences
Group
Instance Refresh Preferences Override default parameters for Instance Refresh.
- Triggers []string
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
- strategy String
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- preferences
Group
Instance Refresh Preferences Override default parameters for Instance Refresh.
- triggers List<String>
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
- strategy string
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- preferences
Group
Instance Refresh Preferences Override default parameters for Instance Refresh.
- triggers string[]
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
- strategy str
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- preferences
Group
Instance Refresh Preferences Override default parameters for Instance Refresh.
- triggers Sequence[str]
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
- strategy String
Strategy to use for instance refresh. The only allowed value is
Rolling
. See StartInstanceRefresh Action for more information.- preferences Property Map
Override default parameters for Instance Refresh.
- triggers List<String>
Set of additional property names that will trigger an Instance Refresh. A refresh will always be triggered by a change in any of
launch_configuration
,launch_template
, ormixed_instances_policy
.
GroupInstanceRefreshPreferences
- Auto
Rollback bool Automatically rollback if instance refresh fails. Defaults to
false
.- Checkpoint
Delay string Number of seconds to wait after a checkpoint. Defaults to
3600
.- Checkpoint
Percentages List<int> List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- Instance
Warmup string Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- Min
Healthy intPercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- Skip
Matching bool Replace instances that already have your desired configuration. Defaults to
false
.
- Auto
Rollback bool Automatically rollback if instance refresh fails. Defaults to
false
.- Checkpoint
Delay string Number of seconds to wait after a checkpoint. Defaults to
3600
.- Checkpoint
Percentages []int List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- Instance
Warmup string Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- Min
Healthy intPercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- Skip
Matching bool Replace instances that already have your desired configuration. Defaults to
false
.
- auto
Rollback Boolean Automatically rollback if instance refresh fails. Defaults to
false
.- checkpoint
Delay String Number of seconds to wait after a checkpoint. Defaults to
3600
.- checkpoint
Percentages List<Integer> List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- instance
Warmup String Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- min
Healthy IntegerPercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- skip
Matching Boolean Replace instances that already have your desired configuration. Defaults to
false
.
- auto
Rollback boolean Automatically rollback if instance refresh fails. Defaults to
false
.- checkpoint
Delay string Number of seconds to wait after a checkpoint. Defaults to
3600
.- checkpoint
Percentages number[] List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- instance
Warmup string Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- min
Healthy numberPercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- skip
Matching boolean Replace instances that already have your desired configuration. Defaults to
false
.
- auto_
rollback bool Automatically rollback if instance refresh fails. Defaults to
false
.- checkpoint_
delay str Number of seconds to wait after a checkpoint. Defaults to
3600
.- checkpoint_
percentages Sequence[int] List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- instance_
warmup str Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- min_
healthy_ intpercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- skip_
matching bool Replace instances that already have your desired configuration. Defaults to
false
.
- auto
Rollback Boolean Automatically rollback if instance refresh fails. Defaults to
false
.- checkpoint
Delay String Number of seconds to wait after a checkpoint. Defaults to
3600
.- checkpoint
Percentages List<Number> List of percentages for each checkpoint. Values must be unique and in ascending order. To replace all instances, the final number must be
100
.- instance
Warmup String Number of seconds until a newly launched instance is configured and ready to use. Default behavior is to use the Auto Scaling Group's health check grace period.
- min
Healthy NumberPercentage Amount of capacity in the Auto Scaling group that must remain healthy during an instance refresh to allow the operation to continue, as a percentage of the desired capacity of the Auto Scaling group. Defaults to
90
.- skip
Matching Boolean Replace instances that already have your desired configuration. Defaults to
false
.
GroupLaunchTemplate
GroupMixedInstancesPolicy
- Launch
Template GroupMixed Instances Policy Launch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Instances
Distribution GroupMixed Instances Policy Instances Distribution Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
- Launch
Template GroupMixed Instances Policy Launch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Instances
Distribution GroupMixed Instances Policy Instances Distribution Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
- launch
Template GroupMixed Instances Policy Launch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- instances
Distribution GroupMixed Instances Policy Instances Distribution Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
- launch
Template GroupMixed Instances Policy Launch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- instances
Distribution GroupMixed Instances Policy Instances Distribution Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
- launch_
template GroupMixed Instances Policy Launch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- instances_
distribution GroupMixed Instances Policy Instances Distribution Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
- launch
Template Property Map Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- instances
Distribution Property Map Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.
GroupMixedInstancesPolicyInstancesDistribution
- On
Demand stringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- On
Demand intBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- On
Demand intPercentage Above Base Capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- Spot
Allocation stringStrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- Spot
Instance intPools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- Spot
Max stringPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
- On
Demand stringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- On
Demand intBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- On
Demand intPercentage Above Base Capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- Spot
Allocation stringStrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- Spot
Instance intPools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- Spot
Max stringPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
- on
Demand StringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- on
Demand IntegerBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- on
Demand IntegerPercentage Above Base Capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- spot
Allocation StringStrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- spot
Instance IntegerPools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- spot
Max StringPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
- on
Demand stringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- on
Demand numberBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- on
Demand numberPercentage Above Base Capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- spot
Allocation stringStrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- spot
Instance numberPools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- spot
Max stringPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
- on_
demand_ strallocation_ strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- on_
demand_ intbase_ capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- on_
demand_ intpercentage_ above_ base_ capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- spot_
allocation_ strstrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- spot_
instance_ intpools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- spot_
max_ strprice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
- on
Demand StringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized
,lowest-price
. Default:prioritized
.- on
Demand NumberBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0
.- on
Demand NumberPercentage Above Base Capacity Percentage split between on-demand and Spot instances above the base on-demand capacity. Default:
100
.- spot
Allocation StringStrategy How to allocate capacity across the Spot pools. Valid values:
lowest-price
,capacity-optimized
,capacity-optimized-prioritized
, andprice-capacity-optimized
. Default:lowest-price
.- spot
Instance NumberPools Number of Spot pools per availability zone to allocate capacity. EC2 Auto Scaling selects the cheapest Spot pools and evenly allocates Spot capacity across the number of Spot pools that you specify. Only available with
spot_allocation_strategy
set tolowest-price
. Otherwise it must be set to0
, if it has been defined before. Default:2
.- spot
Max StringPrice Maximum price per unit hour that the user is willing to pay for the Spot instances. Default: an empty string which means the on-demand price.
GroupMixedInstancesPolicyLaunchTemplate
- Launch
Template GroupSpecification Mixed Instances Policy Launch Template Launch Template Specification Nested argument defines the Launch Template. Defined below.
- Overrides
List<Group
Mixed Instances Policy Launch Template Override> List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
- Launch
Template GroupSpecification Mixed Instances Policy Launch Template Launch Template Specification Nested argument defines the Launch Template. Defined below.
- Overrides
[]Group
Mixed Instances Policy Launch Template Override List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
- launch
Template GroupSpecification Mixed Instances Policy Launch Template Launch Template Specification Nested argument defines the Launch Template. Defined below.
- overrides
List<Group
Mixed Instances Policy Launch Template Override> List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
- launch
Template GroupSpecification Mixed Instances Policy Launch Template Launch Template Specification Nested argument defines the Launch Template. Defined below.
- overrides
Group
Mixed Instances Policy Launch Template Override[] List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
- launch_
template_ Groupspecification Mixed Instances Policy Launch Template Launch Template Specification Nested argument defines the Launch Template. Defined below.
- overrides
Sequence[Group
Mixed Instances Policy Launch Template Override] List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
- launch
Template Property MapSpecification Nested argument defines the Launch Template. Defined below.
- overrides List<Property Map>
List of nested arguments provides the ability to specify multiple instance types. This will override the same parameter in the launch template. For on-demand instances, Auto Scaling considers the order of preference of instance types to launch based on the order specified in the overrides list. Defined below.
GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification
- Launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- Launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- Version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- Launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- Launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- Version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template StringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template StringName Name of the launch template. Conflicts with
launch_template_id
.- version String
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch_
template_ strid ID of the launch template. Conflicts with
launch_template_name
.- launch_
template_ strname Name of the launch template. Conflicts with
launch_template_id
.- version str
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template StringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template StringName Name of the launch template. Conflicts with
launch_template_id
.- version String
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
GroupMixedInstancesPolicyLaunchTemplateOverride
- Instance
Requirements GroupMixed Instances Policy Launch Template Override Instance Requirements Override the instance type in the Launch Template with instance types that satisfy the requirements.
- Instance
Type string Override the instance type in the Launch Template.
- Launch
Template GroupSpecification Mixed Instances Policy Launch Template Override Launch Template Specification Nested argument defines the Launch Template. Defined below.
- Weighted
Capacity string Number of capacity units, which gives the instance type a proportional weight to other instance types.
- Instance
Requirements GroupMixed Instances Policy Launch Template Override Instance Requirements Override the instance type in the Launch Template with instance types that satisfy the requirements.
- Instance
Type string Override the instance type in the Launch Template.
- Launch
Template GroupSpecification Mixed Instances Policy Launch Template Override Launch Template Specification Nested argument defines the Launch Template. Defined below.
- Weighted
Capacity string Number of capacity units, which gives the instance type a proportional weight to other instance types.
- instance
Requirements GroupMixed Instances Policy Launch Template Override Instance Requirements Override the instance type in the Launch Template with instance types that satisfy the requirements.
- instance
Type String Override the instance type in the Launch Template.
- launch
Template GroupSpecification Mixed Instances Policy Launch Template Override Launch Template Specification Nested argument defines the Launch Template. Defined below.
- weighted
Capacity String Number of capacity units, which gives the instance type a proportional weight to other instance types.
- instance
Requirements GroupMixed Instances Policy Launch Template Override Instance Requirements Override the instance type in the Launch Template with instance types that satisfy the requirements.
- instance
Type string Override the instance type in the Launch Template.
- launch
Template GroupSpecification Mixed Instances Policy Launch Template Override Launch Template Specification Nested argument defines the Launch Template. Defined below.
- weighted
Capacity string Number of capacity units, which gives the instance type a proportional weight to other instance types.
- instance_
requirements GroupMixed Instances Policy Launch Template Override Instance Requirements Override the instance type in the Launch Template with instance types that satisfy the requirements.
- instance_
type str Override the instance type in the Launch Template.
- launch_
template_ Groupspecification Mixed Instances Policy Launch Template Override Launch Template Specification Nested argument defines the Launch Template. Defined below.
- weighted_
capacity str Number of capacity units, which gives the instance type a proportional weight to other instance types.
- instance
Requirements Property Map Override the instance type in the Launch Template with instance types that satisfy the requirements.
- instance
Type String Override the instance type in the Launch Template.
- launch
Template Property MapSpecification Nested argument defines the Launch Template. Defined below.
- weighted
Capacity String Number of capacity units, which gives the instance type a proportional weight to other instance types.
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirements
- Accelerator
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Accelerator Count Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- Accelerator
Manufacturers List<string> List of accelerator manufacturer names. Default is any manufacturer.
- Accelerator
Names List<string> List of accelerator names. Default is any acclerator.
- Accelerator
Total GroupMemory Mib Mixed Instances Policy Launch Template Override Instance Requirements Accelerator Total Memory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- Accelerator
Types List<string> List of accelerator types. Default is any accelerator type.
- Allowed
Instance List<string>Types List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- Bare
Metal string Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- Baseline
Ebs GroupBandwidth Mbps Mixed Instances Policy Launch Template Override Instance Requirements Baseline Ebs Bandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- Burstable
Performance string Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- Cpu
Manufacturers List<string> List of CPU manufacturer names. Default is any manufacturer.
- Excluded
Instance List<string>Types List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- Instance
Generations List<string> List of instance generation names. Default is any generation.
- Local
Storage string Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- Local
Storage List<string>Types List of local storage type names. Default any storage type.
- Memory
Gib GroupPer Vcpu Mixed Instances Policy Launch Template Override Instance Requirements Memory Gib Per Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- Memory
Mib GroupMixed Instances Policy Launch Template Override Instance Requirements Memory Mib Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- Network
Bandwidth GroupGbps Mixed Instances Policy Launch Template Override Instance Requirements Network Bandwidth Gbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- Network
Interface GroupCount Mixed Instances Policy Launch Template Override Instance Requirements Network Interface Count Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- On
Demand intMax Price Percentage Over Lowest Price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- Require
Hibernate boolSupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- Spot
Max intPrice Percentage Over Lowest Price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- Total
Local GroupStorage Gb Mixed Instances Policy Launch Template Override Instance Requirements Total Local Storage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- Vcpu
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Vcpu Count Block describing the minimum and maximum number of vCPUs. Default is no maximum.
- Accelerator
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Accelerator Count Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- Accelerator
Manufacturers []string List of accelerator manufacturer names. Default is any manufacturer.
- Accelerator
Names []string List of accelerator names. Default is any acclerator.
- Accelerator
Total GroupMemory Mib Mixed Instances Policy Launch Template Override Instance Requirements Accelerator Total Memory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- Accelerator
Types []string List of accelerator types. Default is any accelerator type.
- Allowed
Instance []stringTypes List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- Bare
Metal string Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- Baseline
Ebs GroupBandwidth Mbps Mixed Instances Policy Launch Template Override Instance Requirements Baseline Ebs Bandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- Burstable
Performance string Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- Cpu
Manufacturers []string List of CPU manufacturer names. Default is any manufacturer.
- Excluded
Instance []stringTypes List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- Instance
Generations []string List of instance generation names. Default is any generation.
- Local
Storage string Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- Local
Storage []stringTypes List of local storage type names. Default any storage type.
- Memory
Gib GroupPer Vcpu Mixed Instances Policy Launch Template Override Instance Requirements Memory Gib Per Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- Memory
Mib GroupMixed Instances Policy Launch Template Override Instance Requirements Memory Mib Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- Network
Bandwidth GroupGbps Mixed Instances Policy Launch Template Override Instance Requirements Network Bandwidth Gbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- Network
Interface GroupCount Mixed Instances Policy Launch Template Override Instance Requirements Network Interface Count Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- On
Demand intMax Price Percentage Over Lowest Price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- Require
Hibernate boolSupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- Spot
Max intPrice Percentage Over Lowest Price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- Total
Local GroupStorage Gb Mixed Instances Policy Launch Template Override Instance Requirements Total Local Storage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- Vcpu
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Vcpu Count Block describing the minimum and maximum number of vCPUs. Default is no maximum.
- accelerator
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Accelerator Count Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- accelerator
Manufacturers List<String> List of accelerator manufacturer names. Default is any manufacturer.
- accelerator
Names List<String> List of accelerator names. Default is any acclerator.
- accelerator
Total GroupMemory Mib Mixed Instances Policy Launch Template Override Instance Requirements Accelerator Total Memory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- accelerator
Types List<String> List of accelerator types. Default is any accelerator type.
- allowed
Instance List<String>Types List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- bare
Metal String Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- baseline
Ebs GroupBandwidth Mbps Mixed Instances Policy Launch Template Override Instance Requirements Baseline Ebs Bandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- burstable
Performance String Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- cpu
Manufacturers List<String> List of CPU manufacturer names. Default is any manufacturer.
- excluded
Instance List<String>Types List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- instance
Generations List<String> List of instance generation names. Default is any generation.
- local
Storage String Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- local
Storage List<String>Types List of local storage type names. Default any storage type.
- memory
Gib GroupPer Vcpu Mixed Instances Policy Launch Template Override Instance Requirements Memory Gib Per Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- memory
Mib GroupMixed Instances Policy Launch Template Override Instance Requirements Memory Mib Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- network
Bandwidth GroupGbps Mixed Instances Policy Launch Template Override Instance Requirements Network Bandwidth Gbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- network
Interface GroupCount Mixed Instances Policy Launch Template Override Instance Requirements Network Interface Count Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- on
Demand IntegerMax Price Percentage Over Lowest Price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- require
Hibernate BooleanSupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- spot
Max IntegerPrice Percentage Over Lowest Price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- total
Local GroupStorage Gb Mixed Instances Policy Launch Template Override Instance Requirements Total Local Storage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- vcpu
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Vcpu Count Block describing the minimum and maximum number of vCPUs. Default is no maximum.
- accelerator
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Accelerator Count Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- accelerator
Manufacturers string[] List of accelerator manufacturer names. Default is any manufacturer.
- accelerator
Names string[] List of accelerator names. Default is any acclerator.
- accelerator
Total GroupMemory Mib Mixed Instances Policy Launch Template Override Instance Requirements Accelerator Total Memory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- accelerator
Types string[] List of accelerator types. Default is any accelerator type.
- allowed
Instance string[]Types List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- bare
Metal string Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- baseline
Ebs GroupBandwidth Mbps Mixed Instances Policy Launch Template Override Instance Requirements Baseline Ebs Bandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- burstable
Performance string Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- cpu
Manufacturers string[] List of CPU manufacturer names. Default is any manufacturer.
- excluded
Instance string[]Types List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- instance
Generations string[] List of instance generation names. Default is any generation.
- local
Storage string Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- local
Storage string[]Types List of local storage type names. Default any storage type.
- memory
Gib GroupPer Vcpu Mixed Instances Policy Launch Template Override Instance Requirements Memory Gib Per Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- memory
Mib GroupMixed Instances Policy Launch Template Override Instance Requirements Memory Mib Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- network
Bandwidth GroupGbps Mixed Instances Policy Launch Template Override Instance Requirements Network Bandwidth Gbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- network
Interface GroupCount Mixed Instances Policy Launch Template Override Instance Requirements Network Interface Count Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- on
Demand numberMax Price Percentage Over Lowest Price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- require
Hibernate booleanSupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- spot
Max numberPrice Percentage Over Lowest Price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- total
Local GroupStorage Gb Mixed Instances Policy Launch Template Override Instance Requirements Total Local Storage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- vcpu
Count GroupMixed Instances Policy Launch Template Override Instance Requirements Vcpu Count Block describing the minimum and maximum number of vCPUs. Default is no maximum.
- accelerator_
count GroupMixed Instances Policy Launch Template Override Instance Requirements Accelerator Count Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- accelerator_
manufacturers Sequence[str] List of accelerator manufacturer names. Default is any manufacturer.
- accelerator_
names Sequence[str] List of accelerator names. Default is any acclerator.
- accelerator_
total_ Groupmemory_ mib Mixed Instances Policy Launch Template Override Instance Requirements Accelerator Total Memory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- accelerator_
types Sequence[str] List of accelerator types. Default is any accelerator type.
- allowed_
instance_ Sequence[str]types List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- bare_
metal str Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- baseline_
ebs_ Groupbandwidth_ mbps Mixed Instances Policy Launch Template Override Instance Requirements Baseline Ebs Bandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- burstable_
performance str Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- cpu_
manufacturers Sequence[str] List of CPU manufacturer names. Default is any manufacturer.
- excluded_
instance_ Sequence[str]types List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- instance_
generations Sequence[str] List of instance generation names. Default is any generation.
- local_
storage str Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- local_
storage_ Sequence[str]types List of local storage type names. Default any storage type.
- memory_
gib_ Groupper_ vcpu Mixed Instances Policy Launch Template Override Instance Requirements Memory Gib Per Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- memory_
mib GroupMixed Instances Policy Launch Template Override Instance Requirements Memory Mib Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- network_
bandwidth_ Groupgbps Mixed Instances Policy Launch Template Override Instance Requirements Network Bandwidth Gbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- network_
interface_ Groupcount Mixed Instances Policy Launch Template Override Instance Requirements Network Interface Count Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- on_
demand_ intmax_ price_ percentage_ over_ lowest_ price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- require_
hibernate_ boolsupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- spot_
max_ intprice_ percentage_ over_ lowest_ price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- total_
local_ Groupstorage_ gb Mixed Instances Policy Launch Template Override Instance Requirements Total Local Storage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- vcpu_
count GroupMixed Instances Policy Launch Template Override Instance Requirements Vcpu Count Block describing the minimum and maximum number of vCPUs. Default is no maximum.
- accelerator
Count Property Map Block describing the minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips). Default is no minimum or maximum.
- accelerator
Manufacturers List<String> List of accelerator manufacturer names. Default is any manufacturer.
- accelerator
Names List<String> List of accelerator names. Default is any acclerator.
- accelerator
Total Property MapMemory Mib Block describing the minimum and maximum total memory of the accelerators. Default is no minimum or maximum.
- accelerator
Types List<String> List of accelerator types. Default is any accelerator type.
- allowed
Instance List<String>Types List of instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk (*), to allow an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are allowing the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are allowing all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is all instance types.- bare
Metal String Indicate whether bare metal instace types should be
included
,excluded
, orrequired
. Default isexcluded
.- baseline
Ebs Property MapBandwidth Mbps Block describing the minimum and maximum baseline EBS bandwidth, in Mbps. Default is no minimum or maximum.
- burstable
Performance String Indicate whether burstable performance instance types should be
included
,excluded
, orrequired
. Default isexcluded
.- cpu
Manufacturers List<String> List of CPU manufacturer names. Default is any manufacturer.
- excluded
Instance List<String>Types List of instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (*), to exclude an instance type, size, or generation. The following are examples:
m5.8xlarge
,c5*.*
,m5a.*
,r*
,*3*
. For example, if you specifyc5*
, you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specifym5a.*
, you are excluding all the M5a instance types, but not the M5n instance types. Maximum of 400 entries in the list; each entry is limited to 30 characters. Default is no excluded instance types.- instance
Generations List<String> List of instance generation names. Default is any generation.
- local
Storage String Indicate whether instance types with local storage volumes are
included
,excluded
, orrequired
. Default isincluded
.- local
Storage List<String>Types List of local storage type names. Default any storage type.
- memory
Gib Property MapPer Vcpu Block describing the minimum and maximum amount of memory (GiB) per vCPU. Default is no minimum or maximum.
- memory
Mib Property Map Block describing the minimum and maximum amount of memory (MiB). Default is no maximum.
- network
Bandwidth Property MapGbps Block describing the minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default is no minimum or maximum.
- network
Interface Property MapCount Block describing the minimum and maximum number of network interfaces. Default is no minimum or maximum.
- on
Demand NumberMax Price Percentage Over Lowest Price Price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 20.
- require
Hibernate BooleanSupport Indicate whether instance types must support On-Demand Instance Hibernation, either
true
orfalse
. Default isfalse
.- spot
Max NumberPrice Percentage Over Lowest Price Price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the cheapest M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999. Default is 100.
- total
Local Property MapStorage Gb Block describing the minimum and maximum total local storage (GB). Default is no minimum or maximum.
- vcpu
Count Property Map Block describing the minimum and maximum number of vCPUs. Default is no maximum.
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsAcceleratorCount
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsAcceleratorTotalMemoryMib
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsBaselineEbsBandwidthMbps
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryGibPerVcpu
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMib
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsNetworkBandwidthGbps
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsNetworkInterfaceCount
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsTotalLocalStorageGb
GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCount
GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecification
- Launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- Launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- Version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- Launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- Launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- Version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template StringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template StringName Name of the launch template. Conflicts with
launch_template_id
.- version String
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template stringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template stringName Name of the launch template. Conflicts with
launch_template_id
.- version string
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch_
template_ strid ID of the launch template. Conflicts with
launch_template_name
.- launch_
template_ strname Name of the launch template. Conflicts with
launch_template_id
.- version str
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
- launch
Template StringId ID of the launch template. Conflicts with
launch_template_name
.- launch
Template StringName Name of the launch template. Conflicts with
launch_template_id
.- version String
Template version. Can be version number,
$Latest
, or$Default
. (Default:$Default
).
GroupTag
- Key string
Key
- Propagate
At boolLaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- Value string
Value
- Key string
Key
- Propagate
At boolLaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- Value string
Value
- key String
Key
- propagate
At BooleanLaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- value String
Value
- key string
Key
- propagate
At booleanLaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- value string
Value
- key str
Key
- propagate_
at_ boollaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- value str
Value
- key String
Key
- propagate
At BooleanLaunch Enables propagation of the tag to Amazon EC2 instances launched via this ASG
- value String
Value
GroupWarmPool
- Instance
Reuse GroupPolicy Warm Pool Instance Reuse Policy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- Max
Group intPrepared Capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- Min
Size int Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- Pool
State string Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
- Instance
Reuse GroupPolicy Warm Pool Instance Reuse Policy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- Max
Group intPrepared Capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- Min
Size int Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- Pool
State string Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
- instance
Reuse GroupPolicy Warm Pool Instance Reuse Policy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- max
Group IntegerPrepared Capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- min
Size Integer Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- pool
State String Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
- instance
Reuse GroupPolicy Warm Pool Instance Reuse Policy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- max
Group numberPrepared Capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- min
Size number Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- pool
State string Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
- instance_
reuse_ Grouppolicy Warm Pool Instance Reuse Policy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- max_
group_ intprepared_ capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- min_
size int Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- pool_
state str Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
- instance
Reuse Property MapPolicy Whether instances in the Auto Scaling group can be returned to the warm pool on scale in. The default is to terminate instances in the Auto Scaling group when the group scales in.
- max
Group NumberPrepared Capacity Total maximum number of instances that are allowed to be in the warm pool or in any state except Terminated for the Auto Scaling group.
- min
Size Number Minimum number of instances to maintain in the warm pool. This helps you to ensure that there is always a certain number of warmed instances available to handle traffic spikes. Defaults to 0 if not specified.
- pool
State String Sets the instance state to transition to after the lifecycle hooks finish. Valid values are: Stopped (default), Running or Hibernated.
GroupWarmPoolInstanceReusePolicy
- Reuse
On boolScale In Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
- Reuse
On boolScale In Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
- reuse
On BooleanScale In Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
- reuse
On booleanScale In Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
- reuse_
on_ boolscale_ in Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
- reuse
On BooleanScale In Whether instances in the Auto Scaling group can be returned to the warm pool on scale in.
MetricsGranularity
- One
Minute - 1Minute
- Metrics
Granularity One Minute - 1Minute
- One
Minute - 1Minute
- One
Minute - 1Minute
- ONE_MINUTE
- 1Minute
- "1Minute"
- 1Minute
Import
Auto Scaling Groups can be imported using the name
, e.g.,
$ pulumi import aws:autoscaling/group:Group web web-asg
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.