Group

Provides an AutoScaling Group resource.

Note: You must specify either launch_configuration, launch_template, or mixed_instances_policy.

Interpolated tags

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const extraTags = config.get("extraTags") || [
    {
        key: "Foo",
        propagateAtLaunch: true,
        value: "Bar",
    },
    {
        key: "Baz",
        propagateAtLaunch: true,
        value: "Bam",
    },
];

const bar = new aws.autoscaling.Group("bar", {
    launchConfiguration: aws_launch_configuration_foobar.name,
    maxSize: 5,
    minSize: 2,
    tagsCollection: [{"key": "interpolation1", "value": "value3", "propagate_at_launch": true}, {"key": "interpolation2", "value": "value4", "propagate_at_launch": true}].concat(extraTags),
    vpcZoneIdentifiers: [
        aws_subnet_example1.id,
        aws_subnet_example2.id,
    ],
});

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 this 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, this 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 this provider moves on. If new instances don’t pass the ELB’s health checks for any reason, the deployment 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, this 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

With Latest Version Of Launch Template

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var foobar = new Aws.Ec2.LaunchTemplate("foobar", new Aws.Ec2.LaunchTemplateArgs
        {
            ImageId = "ami-1a2b3c",
            InstanceType = "t2.micro",
            NamePrefix = "foobar",
        });
        var bar = new Aws.AutoScaling.Group("bar", new Aws.AutoScaling.GroupArgs
        {
            AvailabilityZones = 
            {
                "us-east-1a",
            },
            DesiredCapacity = 1,
            LaunchTemplate = new Aws.AutoScaling.Inputs.GroupLaunchTemplateArgs
            {
                Id = foobar.Id,
                Version = "$Latest",
            },
            MaxSize = 1,
            MinSize = 1,
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/autoscaling"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        foobar, err := ec2.NewLaunchTemplate(ctx, "foobar", &ec2.LaunchTemplateArgs{
            ImageId:      pulumi.String("ami-1a2b3c"),
            InstanceType: pulumi.String("t2.micro"),
            NamePrefix:   pulumi.String("foobar"),
        })
        if err != nil {
            return err
        }
        _, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{
            AvailabilityZones: pulumi.StringArray{
                pulumi.String("us-east-1a"),
            },
            DesiredCapacity: pulumi.Int(1),
            LaunchTemplate: &autoscaling.GroupLaunchTemplateArgs{
                Id:      foobar.ID(),
                Version: pulumi.String(fmt.Sprintf("%v%v", "$", "Latest")),
            },
            MaxSize: pulumi.Int(1),
            MinSize: pulumi.Int(1),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

foobar = aws.ec2.LaunchTemplate("foobar",
    image_id="ami-1a2b3c",
    instance_type="t2.micro",
    name_prefix="foobar")
bar = aws.autoscaling.Group("bar",
    availability_zones=["us-east-1a"],
    desired_capacity=1,
    launch_template={
        "id": foobar.id,
        "version": "$Latest",
    },
    max_size=1,
    min_size=1)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foobar = new aws.ec2.LaunchTemplate("foobar", {
    imageId: "ami-1a2b3c",
    instanceType: "t2.micro",
    namePrefix: "foobar",
});
const bar = new aws.autoscaling.Group("bar", {
    availabilityZones: ["us-east-1a"],
    desiredCapacity: 1,
    launchTemplate: {
        id: foobar.id,
        version: "$Latest",
    },
    maxSize: 1,
    minSize: 1,
});

Mixed Instances Policy

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleLaunchTemplate = new Aws.Ec2.LaunchTemplate("exampleLaunchTemplate", new Aws.Ec2.LaunchTemplateArgs
        {
            ImageId = data.Aws_ami.Example.Id,
            InstanceType = "c5.large",
            NamePrefix = "example",
        });
        var exampleGroup = new Aws.AutoScaling.Group("exampleGroup", new Aws.AutoScaling.GroupArgs
        {
            AvailabilityZones = 
            {
                "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,
                    },
                    Override = 
                    {
                        
                        {
                            { "instanceType", "c4.large" },
                            { "weightedCapacity", "3" },
                        },
                        
                        {
                            { "instanceType", "c3.large" },
                            { "weightedCapacity", "2" },
                        },
                    },
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/autoscaling"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "exampleLaunchTemplate", &ec2.LaunchTemplateArgs{
            ImageId:      pulumi.String(data.Aws_ami.Example.Id),
            InstanceType: pulumi.String("c5.large"),
            NamePrefix:   pulumi.String("example"),
        })
        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(),
                    },
                    Override: pulumi.StringMapArray{
                        pulumi.StringMap{
                            "instanceType":     pulumi.String("c4.large"),
                            "weightedCapacity": pulumi.String("3"),
                        },
                        pulumi.StringMap{
                            "instanceType":     pulumi.String("c3.large"),
                            "weightedCapacity": pulumi.String("2"),
                        },
                    },
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example_launch_template = aws.ec2.LaunchTemplate("exampleLaunchTemplate",
    image_id=data["aws_ami"]["example"]["id"],
    instance_type="c5.large",
    name_prefix="example")
example_group = aws.autoscaling.Group("exampleGroup",
    availability_zones=["us-east-1a"],
    desired_capacity=1,
    max_size=1,
    min_size=1,
    mixed_instances_policy={
        "launch_template": {
            "launchTemplateSpecification": {
                "launchTemplateId": example_launch_template.id,
            },
            "override": [
                {
                    "instance_type": "c4.large",
                    "weightedCapacity": "3",
                },
                {
                    "instance_type": "c3.large",
                    "weightedCapacity": "2",
                },
            ],
        },
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleLaunchTemplate = new aws.ec2.LaunchTemplate("example", {
    imageId: aws_ami_example.id,
    instanceType: "c5.large",
    namePrefix: "example",
});
const exampleGroup = new aws.autoscaling.Group("example", {
    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",
                },
            ],
        },
    },
});

Create a Group Resource

new Group(name: string, args: GroupArgs, opts?: CustomResourceOptions);
def Group(resource_name, opts=None, availability_zones=None, default_cooldown=None, desired_capacity=None, enabled_metrics=None, force_delete=None, health_check_grace_period=None, health_check_type=None, initial_lifecycle_hooks=None, launch_configuration=None, launch_template=None, load_balancers=None, max_instance_lifetime=None, max_size=None, metrics_granularity=None, min_elb_capacity=None, min_size=None, mixed_instances_policy=None, name=None, name_prefix=None, placement_group=None, protect_from_scale_in=None, service_linked_role_arn=None, suspended_processes=None, tags=None, tags_collection=None, target_group_arns=None, termination_policies=None, vpc_zone_identifiers=None, wait_for_capacity_timeout=None, wait_for_elb_capacity=None, __props__=None)
func NewGroup(ctx *Context, name string, args GroupArgs, opts ...ResourceOption) (*Group, error)
public Group(string name, GroupArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Group Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Group resource accepts the following input properties:

MaxSize int

The maximum size of the auto scale group.

MinSize int

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

AvailabilityZones List<string>

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

DefaultCooldown int

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

DesiredCapacity int

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

EnabledMetrics List<string>

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

ForceDelete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

HealthCheckGracePeriod int

Time (in seconds) after instance comes into service before checking health.

HealthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

InitialLifecycleHooks List<GroupInitialLifecycleHookArgs>

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

LaunchConfiguration string

The name of the launch configuration to use.

LaunchTemplate GroupLaunchTemplateArgs

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

LoadBalancers List<string>

A 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.

MaxInstanceLifetime int

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

MetricsGranularity string

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

MinElbCapacity int

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

MixedInstancesPolicy GroupMixedInstancesPolicyArgs

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

Name string

The name of the auto scaling group. By default generated by this provider.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementGroup string

The name of the placement group into which you’ll launch your instances, if any.

ProtectFromScaleIn bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

ServiceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

SuspendedProcesses List<string>

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

Tags List<GroupTagArgs>

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

TagsCollection List<ImmutableDictionary<string, string>>

Set of maps containing resource tags. Conflicts with tag. Documented below.

TargetGroupArns List<string>

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

TerminationPolicies List<string>

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

VpcZoneIdentifiers List<string>

A list of subnet IDs to launch resources in.

WaitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

WaitForElbCapacity int

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

MaxSize int

The maximum size of the auto scale group.

MinSize int

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

AvailabilityZones []string

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

DefaultCooldown int

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

DesiredCapacity int

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

EnabledMetrics []string

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

ForceDelete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

HealthCheckGracePeriod int

Time (in seconds) after instance comes into service before checking health.

HealthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

InitialLifecycleHooks []GroupInitialLifecycleHook

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

LaunchConfiguration interface{}

The name of the launch configuration to use.

LaunchTemplate GroupLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

LoadBalancers []string

A 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.

MaxInstanceLifetime int

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

MetricsGranularity interface{}

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

MinElbCapacity int

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

MixedInstancesPolicy GroupMixedInstancesPolicy

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

Name string

The name of the auto scaling group. By default generated by this provider.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementGroup interface{}

The name of the placement group into which you’ll launch your instances, if any.

ProtectFromScaleIn bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

ServiceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

SuspendedProcesses []string

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

Tags []GroupTag

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

TagsCollection []map[string]string

Set of maps containing resource tags. Conflicts with tag. Documented below.

TargetGroupArns []string

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

TerminationPolicies []string

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

VpcZoneIdentifiers []string

A list of subnet IDs to launch resources in.

WaitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

WaitForElbCapacity int

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

maxSize number

The maximum size of the auto scale group.

minSize number

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

availabilityZones string[]

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

defaultCooldown number

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

desiredCapacity number

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

enabledMetrics Metric[]

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

forceDelete boolean

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

healthCheckGracePeriod number

Time (in seconds) after instance comes into service before checking health.

healthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

initialLifecycleHooks GroupInitialLifecycleHook[]

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

launchConfiguration string | LaunchConfiguration

The name of the launch configuration to use.

launchTemplate GroupLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

loadBalancers string[]

A 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.

maxInstanceLifetime number

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

metricsGranularity string | MetricsGranularity

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

minElbCapacity number

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

mixedInstancesPolicy GroupMixedInstancesPolicy

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

name string

The name of the auto scaling group. By default generated by this provider.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

placementGroup string | PlacementGroup

The name of the placement group into which you’ll launch your instances, if any.

protectFromScaleIn boolean

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

serviceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

suspendedProcesses string[]

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

tags GroupTag[]

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

tagsCollection {[key: string]: string}[]

Set of maps containing resource tags. Conflicts with tag. Documented below.

targetGroupArns string[]

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

terminationPolicies string[]

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

vpcZoneIdentifiers string[]

A list of subnet IDs to launch resources in.

waitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

waitForElbCapacity number

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

max_size float

The maximum size of the auto scale group.

min_size float

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

availability_zones List[str]

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

default_cooldown float

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

desired_capacity float

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

enabled_metrics List[Metric]

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

force_delete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

health_check_grace_period float

Time (in seconds) after instance comes into service before checking health.

health_check_type str

“EC2” or “ELB”. Controls how health checking is done.

initial_lifecycle_hooks List[GroupInitialLifecycleHook]

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

launch_configuration string | str

The name of the launch configuration to use.

launch_template Dict[GroupLaunchTemplate]

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

load_balancers List[str]

A 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_lifetime float

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

metrics_granularity string | str

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

min_elb_capacity float

Setting this causes this provider to wait for this number of instances from this autoscaling 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_policy Dict[GroupMixedInstancesPolicy]

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

name str

The name of the auto scaling group. By default generated by this provider.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name.

placement_group string | str

The name of the placement group into which you’ll launch your instances, if any.

protect_from_scale_in bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

service_linked_role_arn str

The ARN of the service-linked role that the ASG will use to call other AWS services

suspended_processes List[str]

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

tags List[GroupTag]

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

tags_collection List[Map]

Set of maps containing resource tags. Conflicts with tag. Documented below.

target_group_arns List[str]

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

termination_policies List[str]

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

vpc_zone_identifiers List[str]

A list of subnet IDs to launch resources in.

wait_for_capacity_timeout str

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

wait_for_elb_capacity float

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

Outputs

All input properties are implicitly available as output properties. Additionally, the Group resource produces the following output properties:

Arn string

The ARN for this AutoScaling Group

Id string
The provider-assigned unique ID for this managed resource.
Arn string

The ARN for this AutoScaling Group

Id string
The provider-assigned unique ID for this managed resource.
arn string

The ARN for this AutoScaling Group

id string
The provider-assigned unique ID for this managed resource.
arn str

The ARN for this AutoScaling Group

id str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, arn=None, availability_zones=None, default_cooldown=None, desired_capacity=None, enabled_metrics=None, force_delete=None, health_check_grace_period=None, health_check_type=None, initial_lifecycle_hooks=None, launch_configuration=None, launch_template=None, load_balancers=None, max_instance_lifetime=None, max_size=None, metrics_granularity=None, min_elb_capacity=None, min_size=None, mixed_instances_policy=None, name=None, name_prefix=None, placement_group=None, protect_from_scale_in=None, service_linked_role_arn=None, suspended_processes=None, tags=None, tags_collection=None, target_group_arns=None, termination_policies=None, vpc_zone_identifiers=None, wait_for_capacity_timeout=None, wait_for_elb_capacity=None, __props__=None)
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)
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.

The following state arguments are supported:

Arn string

The ARN for this AutoScaling Group

AvailabilityZones List<string>

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

DefaultCooldown int

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

DesiredCapacity int

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

EnabledMetrics List<string>

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

ForceDelete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

HealthCheckGracePeriod int

Time (in seconds) after instance comes into service before checking health.

HealthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

InitialLifecycleHooks List<GroupInitialLifecycleHookArgs>

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

LaunchConfiguration string

The name of the launch configuration to use.

LaunchTemplate GroupLaunchTemplateArgs

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

LoadBalancers List<string>

A 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.

MaxInstanceLifetime int

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

MaxSize int

The maximum size of the auto scale group.

MetricsGranularity string

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

MinElbCapacity int

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

MinSize int

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

MixedInstancesPolicy GroupMixedInstancesPolicyArgs

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

Name string

The name of the auto scaling group. By default generated by this provider.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementGroup string

The name of the placement group into which you’ll launch your instances, if any.

ProtectFromScaleIn bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

ServiceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

SuspendedProcesses List<string>

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

Tags List<GroupTagArgs>

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

TagsCollection List<ImmutableDictionary<string, string>>

Set of maps containing resource tags. Conflicts with tag. Documented below.

TargetGroupArns List<string>

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

TerminationPolicies List<string>

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

VpcZoneIdentifiers List<string>

A list of subnet IDs to launch resources in.

WaitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

WaitForElbCapacity int

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

Arn string

The ARN for this AutoScaling Group

AvailabilityZones []string

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

DefaultCooldown int

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

DesiredCapacity int

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

EnabledMetrics []string

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

ForceDelete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

HealthCheckGracePeriod int

Time (in seconds) after instance comes into service before checking health.

HealthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

InitialLifecycleHooks []GroupInitialLifecycleHook

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

LaunchConfiguration interface{}

The name of the launch configuration to use.

LaunchTemplate GroupLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

LoadBalancers []string

A 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.

MaxInstanceLifetime int

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

MaxSize int

The maximum size of the auto scale group.

MetricsGranularity interface{}

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

MinElbCapacity int

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

MinSize int

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

MixedInstancesPolicy GroupMixedInstancesPolicy

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

Name string

The name of the auto scaling group. By default generated by this provider.

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

PlacementGroup interface{}

The name of the placement group into which you’ll launch your instances, if any.

ProtectFromScaleIn bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

ServiceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

SuspendedProcesses []string

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

Tags []GroupTag

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

TagsCollection []map[string]string

Set of maps containing resource tags. Conflicts with tag. Documented below.

TargetGroupArns []string

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

TerminationPolicies []string

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

VpcZoneIdentifiers []string

A list of subnet IDs to launch resources in.

WaitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

WaitForElbCapacity int

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

arn string

The ARN for this AutoScaling Group

availabilityZones string[]

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

defaultCooldown number

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

desiredCapacity number

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

enabledMetrics Metric[]

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

forceDelete boolean

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

healthCheckGracePeriod number

Time (in seconds) after instance comes into service before checking health.

healthCheckType string

“EC2” or “ELB”. Controls how health checking is done.

initialLifecycleHooks GroupInitialLifecycleHook[]

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

launchConfiguration string | LaunchConfiguration

The name of the launch configuration to use.

launchTemplate GroupLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

loadBalancers string[]

A 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.

maxInstanceLifetime number

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

maxSize number

The maximum size of the auto scale group.

metricsGranularity string | MetricsGranularity

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

minElbCapacity number

Setting this causes this provider to wait for this number of instances from this autoscaling 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.)

minSize number

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

mixedInstancesPolicy GroupMixedInstancesPolicy

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

name string

The name of the auto scaling group. By default generated by this provider.

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name.

placementGroup string | PlacementGroup

The name of the placement group into which you’ll launch your instances, if any.

protectFromScaleIn boolean

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

serviceLinkedRoleArn string

The ARN of the service-linked role that the ASG will use to call other AWS services

suspendedProcesses string[]

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

tags GroupTag[]

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

tagsCollection {[key: string]: string}[]

Set of maps containing resource tags. Conflicts with tag. Documented below.

targetGroupArns string[]

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

terminationPolicies string[]

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

vpcZoneIdentifiers string[]

A list of subnet IDs to launch resources in.

waitForCapacityTimeout string

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

waitForElbCapacity number

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

arn str

The ARN for this AutoScaling Group

availability_zones List[str]

A list of one or more availability zones for the group. This parameter should not be specified when using vpc_zone_identifier.

default_cooldown float

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.

desired_capacity float

The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)

enabled_metrics List[Metric]

A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances.

force_delete bool

Allows deleting the autoscaling group without waiting for all instances in the pool to terminate. You can force an autoscaling 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.

health_check_grace_period float

Time (in seconds) after instance comes into service before checking health.

health_check_type str

“EC2” or “ELB”. Controls how health checking is done.

initial_lifecycle_hooks List[GroupInitialLifecycleHook]

One or more Lifecycle Hooks to attach to the autoscaling group before instances are launched. The syntax is exactly the same as the separate aws.autoscaling.LifecycleHook resource, without the autoscaling_group_name attribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please use aws.autoscaling.LifecycleHook resource.

launch_configuration string | str

The name of the launch configuration to use.

launch_template Dict[GroupLaunchTemplate]

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

load_balancers List[str]

A 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_lifetime float

The maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 604800 and 31536000 seconds.

max_size float

The maximum size of the auto scale group.

metrics_granularity string | str

The granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.

min_elb_capacity float

Setting this causes this provider to wait for this number of instances from this autoscaling 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 float

The minimum size of the auto scale group. (See also Waiting for Capacity below.)

mixed_instances_policy Dict[GroupMixedInstancesPolicy]

Configuration block containing settings to define launch targets for Auto Scaling groups. Defined below.

name str

The name of the auto scaling group. By default generated by this provider.

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name.

placement_group string | str

The name of the placement group into which you’ll launch your instances, if any.

protect_from_scale_in bool

Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.

service_linked_role_arn str

The ARN of the service-linked role that the ASG will use to call other AWS services

suspended_processes List[str]

A list of processes to suspend for the AutoScaling Group. The allowed values are Launch, Terminate, HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions, AddToLoadBalancer. Note that if you suspend either the Launch or Terminate process types, it can prevent your autoscaling group from functioning properly.

tags List[GroupTag]

Configuration block(s) containing resource tags. Conflicts with tags. Documented below.

tags_collection List[Map]

Set of maps containing resource tags. Conflicts with tag. Documented below.

target_group_arns List[str]

A list of aws.alb.TargetGroup ARNs, for use with Application or Network Load Balancing.

termination_policies List[str]

A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default.

vpc_zone_identifiers List[str]

A list of subnet IDs to launch resources in.

wait_for_capacity_timeout str

A maximum duration that this provider should wait for ASG instances to be healthy before timing out. (See also Waiting for Capacity below.) Setting this to “0” causes this provider to skip all Capacity Waiting behavior.

wait_for_elb_capacity float

Setting this will cause this provider to wait for exactly this number of healthy instances from this autoscaling 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.)

Supporting Types

GroupInitialLifecycleHook

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

LifecycleTransition string
Name string

The name of the auto scaling group. By default generated by this provider.

DefaultResult string
HeartbeatTimeout int
NotificationMetadata string
NotificationTargetArn string
RoleArn string
LifecycleTransition string
Name string

The name of the auto scaling group. By default generated by this provider.

DefaultResult string
HeartbeatTimeout int
NotificationMetadata string
NotificationTargetArn string
RoleArn string
lifecycleTransition string
name string

The name of the auto scaling group. By default generated by this provider.

defaultResult string
heartbeatTimeout number
notificationMetadata string
notificationTargetArn string
roleArn string
lifecycle_transition str
name str

The name of the auto scaling group. By default generated by this provider.

default_result str
heartbeat_timeout float
notification_metadata str
notification_target_arn str
role_arn str

GroupLaunchTemplate

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Id string

The ID of the launch template. Conflicts with name.

Name string

The name of the auto scaling group. By default generated by this provider.

Version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

Id string

The ID of the launch template. Conflicts with name.

Name string

The name of the auto scaling group. By default generated by this provider.

Version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

id string

The ID of the launch template. Conflicts with name.

name string

The name of the auto scaling group. By default generated by this provider.

version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

id str

The ID of the launch template. Conflicts with name.

name str

The name of the auto scaling group. By default generated by this provider.

version str

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

GroupMixedInstancesPolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

LaunchTemplate GroupMixedInstancesPolicyLaunchTemplateArgs

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

InstancesDistribution GroupMixedInstancesPolicyInstancesDistributionArgs

Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.

LaunchTemplate GroupMixedInstancesPolicyLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

InstancesDistribution GroupMixedInstancesPolicyInstancesDistribution

Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.

launchTemplate GroupMixedInstancesPolicyLaunchTemplate

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

instancesDistribution GroupMixedInstancesPolicyInstancesDistribution

Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.

launch_template Dict[GroupMixedInstancesPolicyLaunchTemplate]

Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.

instancesDistribution Dict[GroupMixedInstancesPolicyInstancesDistribution]

Nested argument containing settings on how to mix on-demand and Spot instances in the Auto Scaling group. Defined below.

GroupMixedInstancesPolicyInstancesDistribution

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

OnDemandAllocationStrategy string

Strategy to use when launching on-demand instances. Valid values: prioritized. Default: prioritized.

OnDemandBaseCapacity int

Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: 0.

OnDemandPercentageAboveBaseCapacity int

Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: 100.

SpotAllocationStrategy string

How to allocate capacity across the Spot pools. Valid values: lowest-price, capacity-optimized. Default: lowest-price.

SpotInstancePools int

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. Default: 2.

SpotMaxPrice string

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.

OnDemandAllocationStrategy string

Strategy to use when launching on-demand instances. Valid values: prioritized. Default: prioritized.

OnDemandBaseCapacity int

Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: 0.

OnDemandPercentageAboveBaseCapacity int

Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: 100.

SpotAllocationStrategy string

How to allocate capacity across the Spot pools. Valid values: lowest-price, capacity-optimized. Default: lowest-price.

SpotInstancePools int

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. Default: 2.

SpotMaxPrice string

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.

onDemandAllocationStrategy string

Strategy to use when launching on-demand instances. Valid values: prioritized. Default: prioritized.

onDemandBaseCapacity number

Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: 0.

onDemandPercentageAboveBaseCapacity number

Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: 100.

spotAllocationStrategy string

How to allocate capacity across the Spot pools. Valid values: lowest-price, capacity-optimized. Default: lowest-price.

spotInstancePools number

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. Default: 2.

spotMaxPrice string

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.

onDemandAllocationStrategy str

Strategy to use when launching on-demand instances. Valid values: prioritized. Default: prioritized.

onDemandBaseCapacity float

Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default: 0.

onDemandPercentageAboveBaseCapacity float

Percentage split between on-demand and Spot instances above the base on-demand capacity. Default: 100.

spotAllocationStrategy str

How to allocate capacity across the Spot pools. Valid values: lowest-price, capacity-optimized. Default: lowest-price.

spotInstancePools float

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. Default: 2.

spotMaxPrice str

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

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

LaunchTemplateSpecification GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs

Nested argument defines the Launch Template. Defined below.

Overrides List<GroupMixedInstancesPolicyLaunchTemplateOverrideArgs>

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.

LaunchTemplateSpecification GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification

Nested argument defines the Launch Template. Defined below.

Overrides []GroupMixedInstancesPolicyLaunchTemplateOverride

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.

launchTemplateSpecification GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification

Nested argument defines the Launch Template. Defined below.

overrides GroupMixedInstancesPolicyLaunchTemplateOverride[]

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.

launchTemplateSpecification Dict[GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification]

Nested argument defines the Launch Template. Defined below.

overrides List[GroupMixedInstancesPolicyLaunchTemplateOverride]

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

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

LaunchTemplateId string

The ID of the launch template. Conflicts with launch_template_name.

LaunchTemplateName string

The name of the launch template. Conflicts with launch_template_id.

Version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

LaunchTemplateId string

The ID of the launch template. Conflicts with launch_template_name.

LaunchTemplateName string

The name of the launch template. Conflicts with launch_template_id.

Version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

launchTemplateId string

The ID of the launch template. Conflicts with launch_template_name.

launchTemplateName string

The name of the launch template. Conflicts with launch_template_id.

version string

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

launchTemplateId str

The ID of the launch template. Conflicts with launch_template_name.

launchTemplateName str

The name of the launch template. Conflicts with launch_template_id.

version str

Template version. Can be version number, $Latest, or $Default. (Default: $Default).

GroupMixedInstancesPolicyLaunchTemplateOverride

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

InstanceType string

Override the instance type in the Launch Template.

WeightedCapacity string

The number of capacity units, which gives the instance type a proportional weight to other instance types.

InstanceType string

Override the instance type in the Launch Template.

WeightedCapacity string

The number of capacity units, which gives the instance type a proportional weight to other instance types.

instanceType string

Override the instance type in the Launch Template.

weightedCapacity string

The number of capacity units, which gives the instance type a proportional weight to other instance types.

instance_type str

Override the instance type in the Launch Template.

weightedCapacity str

The number of capacity units, which gives the instance type a proportional weight to other instance types.

GroupTag

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

Key

PropagateAtLaunch bool

Enables propagation of the tag to Amazon EC2 instances launched via this ASG

Value string

Value

Key string

Key

PropagateAtLaunch bool

Enables propagation of the tag to Amazon EC2 instances launched via this ASG

Value string

Value

key string

Key

propagateAtLaunch boolean

Enables propagation of the tag to Amazon EC2 instances launched via this ASG

value string

Value

key str

Key

propagateAtLaunch bool

Enables propagation of the tag to Amazon EC2 instances launched via this ASG

value str

Value

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.