Group
Provides an AutoScaling Group resource.
Note: You must specify either
launch_configuration,launch_template, ormixed_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);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:
- Max
Size int The maximum size of the auto scale group.
- Min
Size int The minimum size of the auto scale group. (See also Waiting for Capacity below.)
- Availability
Zones List<string> A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- Default
Cooldown int The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Desired
Capacity int The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Enabled
Metrics 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.- 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 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 autoscaling group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- Launch
Configuration string The name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Load
Balancers 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_arnsinstead.- Max
Instance intLifetime 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 The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- Min
Elb intCapacity 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 GroupPolicy Mixed Instances Policy Args 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Group string The name of the placement group into which you’ll launch your instances, if any.
- Protect
From boolScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- Service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.-
List<Immutable
Dictionary<string, string>> Set of maps containing resource tags. Conflicts with
tag. Documented below.- Target
Group List<string>Arns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- Termination
Policies 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.- Vpc
Zone List<string>Identifiers A list of subnet IDs to launch resources in.
- Wait
For stringCapacity Timeout 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 intElb Capacity 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_capacitybehavior.) (See also Waiting for Capacity below.)
- Max
Size int The maximum size of the auto scale group.
- Min
Size int The minimum size of the auto scale group. (See also Waiting for Capacity below.)
- Availability
Zones []string A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- Default
Cooldown int The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Desired
Capacity int The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Enabled
Metrics []string 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 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 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- Launch
Configuration interface{} The name of the launch configuration to use.
- Launch
Template GroupLaunch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Load
Balancers []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_arnsinstead.- Max
Instance intLifetime 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 interface{} The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- Min
Elb intCapacity 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 GroupPolicy Mixed Instances Policy 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Group interface{} The name of the placement group into which you’ll launch your instances, if any.
- Protect
From boolScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- Service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes []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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
[]Group
Tag Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.- []map[string]string
Set of maps containing resource tags. Conflicts with
tag. Documented below.- Target
Group []stringArns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- Termination
Policies []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.- Vpc
Zone []stringIdentifiers A list of subnet IDs to launch resources in.
- Wait
For stringCapacity Timeout 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 intElb Capacity 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_capacitybehavior.) (See also Waiting for Capacity below.)
- max
Size number The maximum size of the auto scale group.
- min
Size number The minimum size of the auto scale group. (See also Waiting for Capacity below.)
- availability
Zones string[] A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- default
Cooldown number The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- desired
Capacity number The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- enabled
Metrics 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 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.
- 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[] 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- launch
Configuration string | LaunchConfiguration The name of the launch configuration to use.
- launch
Template GroupLaunch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- load
Balancers 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_arnsinstead.- max
Instance numberLifetime 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 | MetricsGranularity The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- min
Elb numberCapacity 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 GroupPolicy Mixed Instances Policy 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- placement
Group string | PlacementGroup The name of the placement group into which you’ll launch your instances, if any.
- protect
From booleanScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
Group
Tag[] Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.- {[key: string]: string}[]
Set of maps containing resource tags. Conflicts with
tag. Documented below.- target
Group string[]Arns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- termination
Policies 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.- vpc
Zone string[]Identifiers A list of subnet IDs to launch resources in.
- wait
For stringCapacity Timeout 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 numberElb Capacity 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_capacitybehavior.) (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_ floatgrace_ 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_ List[Grouphooks Initial Lifecycle Hook] 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- launch_
configuration string | str The name of the launch configuration to use.
- launch_
template Dict[GroupLaunch Template] 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_arnsinstead.- max_
instance_ floatlifetime 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 is1Minute.- min_
elb_ floatcapacity 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_ Dict[Grouppolicy Mixed Instances Policy] 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_ boolscale_ in Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- service_
linked_ strrole_ arn 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
List[Group
Tag] Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.-
List[Map
] Set of maps containing resource tags. Conflicts with
tag. Documented below.- target_
group_ List[str]arns A list of
aws.alb.TargetGroupARNs, 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_ List[str]identifiers A list of subnet IDs to launch resources in.
- wait_
for_ strcapacity_ timeout 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_ floatelb_ capacity 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_capacitybehavior.) (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:
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): Groupstatic 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
- Availability
Zones List<string> A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- Default
Cooldown int The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Desired
Capacity int The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Enabled
Metrics 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.- 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 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 autoscaling group before instances are launched. The syntax is exactly the same as the separate
aws.autoscaling.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- Launch
Configuration string The name of the launch configuration to use.
- Launch
Template GroupLaunch Template Args Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Load
Balancers 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_arnsinstead.- Max
Instance intLifetime 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 int The maximum size of the auto scale group.
- Metrics
Granularity string The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- Min
Elb intCapacity 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 int The minimum size of the auto scale 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. Defined below.
- Name string
The name of the auto scaling group. By default generated by this provider.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Group string The name of the placement group into which you’ll launch your instances, if any.
- Protect
From boolScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- Service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
List<Group
Tag Args> Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.-
List<Immutable
Dictionary<string, string>> Set of maps containing resource tags. Conflicts with
tag. Documented below.- Target
Group List<string>Arns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- Termination
Policies 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.- Vpc
Zone List<string>Identifiers A list of subnet IDs to launch resources in.
- Wait
For stringCapacity Timeout 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 intElb Capacity 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_capacitybehavior.) (See also Waiting for Capacity below.)
- Arn string
The ARN for this AutoScaling Group
- Availability
Zones []string A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- Default
Cooldown int The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Desired
Capacity int The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- Enabled
Metrics []string 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 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 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- Launch
Configuration interface{} The name of the launch configuration to use.
- Launch
Template GroupLaunch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- Load
Balancers []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_arnsinstead.- Max
Instance intLifetime 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 int The maximum size of the auto scale group.
- Metrics
Granularity interface{} The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- Min
Elb intCapacity 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 int The minimum size of the auto scale group. (See also Waiting for Capacity below.)
- Mixed
Instances GroupPolicy Mixed Instances Policy 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Placement
Group interface{} The name of the placement group into which you’ll launch your instances, if any.
- Protect
From boolScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- Service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- Suspended
Processes []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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
[]Group
Tag Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.- []map[string]string
Set of maps containing resource tags. Conflicts with
tag. Documented below.- Target
Group []stringArns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- Termination
Policies []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.- Vpc
Zone []stringIdentifiers A list of subnet IDs to launch resources in.
- Wait
For stringCapacity Timeout 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 intElb Capacity 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_capacitybehavior.) (See also Waiting for Capacity below.)
- arn string
The ARN for this AutoScaling Group
- availability
Zones string[] A list of one or more availability zones for the group. This parameter should not be specified when using
vpc_zone_identifier.- default
Cooldown number The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- desired
Capacity number The number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
- enabled
Metrics 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 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.
- 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[] 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- launch
Configuration string | LaunchConfiguration The name of the launch configuration to use.
- launch
Template GroupLaunch Template Nested argument containing launch template settings along with the overrides to specify multiple instance types and weights. Defined below.
- load
Balancers 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_arnsinstead.- max
Instance numberLifetime 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 number The maximum size of the auto scale group.
- metrics
Granularity string | MetricsGranularity The granularity to associate with the metrics to collect. The only valid value is
1Minute. Default is1Minute.- min
Elb numberCapacity 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 number The minimum size of the auto scale group. (See also Waiting for Capacity below.)
- mixed
Instances GroupPolicy Mixed Instances Policy 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- placement
Group string | PlacementGroup The name of the placement group into which you’ll launch your instances, if any.
- protect
From booleanScale In Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- service
Linked stringRole Arn The ARN of the service-linked role that the ASG will use to call other AWS services
- suspended
Processes 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
Group
Tag[] Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.- {[key: string]: string}[]
Set of maps containing resource tags. Conflicts with
tag. Documented below.- target
Group string[]Arns A list of
aws.alb.TargetGroupARNs, for use with Application or Network Load Balancing.- termination
Policies 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.- vpc
Zone string[]Identifiers A list of subnet IDs to launch resources in.
- wait
For stringCapacity Timeout 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 numberElb Capacity 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_capacitybehavior.) (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_ floatgrace_ 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_ List[Grouphooks Initial Lifecycle Hook] 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.LifecycleHookresource, without theautoscaling_group_nameattribute. Please note that this will only work when creating a new autoscaling group. For all other use-cases, please useaws.autoscaling.LifecycleHookresource.- launch_
configuration string | str The name of the launch configuration to use.
- launch_
template Dict[GroupLaunch Template] 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_arnsinstead.- max_
instance_ floatlifetime 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 is1Minute.- min_
elb_ floatcapacity 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_ Dict[Grouppolicy Mixed Instances Policy] 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_ boolscale_ in Allows setting instance protection. The autoscaling group will not select instances with this setting for termination during scale in events.
- service_
linked_ strrole_ arn 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 theLaunchorTerminateprocess types, it can prevent your autoscaling group from functioning properly.-
List[Group
Tag] Configuration block(s) containing resource tags. Conflicts with
tags. Documented below.-
List[Map
] Set of maps containing resource tags. Conflicts with
tag. Documented below.- target_
group_ List[str]arns A list of
aws.alb.TargetGroupARNs, 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_ List[str]identifiers A list of subnet IDs to launch resources in.
- wait_
for_ strcapacity_ timeout 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_ floatelb_ capacity 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_capacitybehavior.) (See also Waiting for Capacity below.)
Supporting Types
GroupInitialLifecycleHook
- Lifecycle
Transition string - Name string
The name of the auto scaling group. By default generated by this provider.
- Default
Result string - Heartbeat
Timeout int - Notification
Metadata string - Notification
Target stringArn - Role
Arn string
- Lifecycle
Transition string - Name string
The name of the auto scaling group. By default generated by this provider.
- Default
Result string - Heartbeat
Timeout int - Notification
Metadata string - Notification
Target stringArn - Role
Arn string
- lifecycle
Transition string - name string
The name of the auto scaling group. By default generated by this provider.
- default
Result string - heartbeat
Timeout number - notification
Metadata string - notification
Target stringArn - role
Arn 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_ strarn - role_
arn str
GroupLaunchTemplate
GroupMixedInstancesPolicy
- Launch
Template GroupMixed Instances Policy Launch Template Args 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 Args 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 Dict[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 Dict[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.
GroupMixedInstancesPolicyInstancesDistribution
- On
Demand stringAllocation Strategy Strategy to use when launching on-demand instances. Valid values:
prioritized. 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. 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. 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. 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. 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. 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. 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. 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. 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. Default:prioritized.- on
Demand floatBase Capacity Absolute minimum amount of desired capacity that must be fulfilled by on-demand instances. Default:
0.- on
Demand floatPercentage 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. Default:lowest-price.- spot
Instance floatPools 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.- 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.
GroupMixedInstancesPolicyLaunchTemplate
- Launch
Template GroupSpecification Mixed Instances Policy Launch Template Launch Template Specification Args Nested argument defines the Launch Template. Defined below.
- Overrides
List<Group
Mixed Instances Policy Launch Template Override Args> 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
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 Dict[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.
GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification
- Launch
Template stringId The ID of the launch template. Conflicts with
launch_template_name.- Launch
Template stringName The 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 The ID of the launch template. Conflicts with
launch_template_name.- Launch
Template stringName The 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 The ID of the launch template. Conflicts with
launch_template_name.- launch
Template stringName The 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 The ID of the launch template. Conflicts with
launch_template_name.- launch
Template strName 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
- Instance
Type string Override the instance type in the Launch Template.
- Weighted
Capacity string The number of capacity units, which gives the instance type a proportional weight to other instance types.
- Instance
Type string Override the instance type in the Launch Template.
- Weighted
Capacity string The number of capacity units, which gives the instance type a proportional weight to other instance types.
- instance
Type string Override the instance type in the Launch Template.
- weighted
Capacity 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.
- weighted
Capacity str The number of capacity units, which gives the instance type a proportional weight to other instance types.
GroupTag
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.