Group

class Group : KotlinCustomResource

Provides an Auto Scaling Group resource.

Note: You must specify either launch_configuration, launch_template, or mixed_instances_policy. NOTE on Auto Scaling Groups and ASG Attachments: This provider currently provides both a standalone aws.autoscaling.Attachment resource (describing an ASG attached to an ELB or ALB), and an aws.autoscaling.Group with load_balancers and target_group_arns defined in-line. These two methods are not mutually-exclusive. If aws.autoscaling.Attachment resources are used, either alone or with inline load_balancers or target_group_arns, the aws.autoscaling.Group resource must be configured to ignore changes to the load_balancers and target_group_arns arguments.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.PlacementGroup;
import com.pulumi.aws.ec2.PlacementGroupArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInitialLifecycleHookArgs;
import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new PlacementGroup("test", PlacementGroupArgs.builder()
.strategy("cluster")
.build());
var bar = new Group("bar", GroupArgs.builder()
.maxSize(5)
.minSize(2)
.healthCheckGracePeriod(300)
.healthCheckType("ELB")
.desiredCapacity(4)
.forceDelete(true)
.placementGroup(test.id())
.launchConfiguration(aws_launch_configuration.foobar().name())
.vpcZoneIdentifiers(
aws_subnet.example1().id(),
aws_subnet.example2().id())
.initialLifecycleHooks(GroupInitialLifecycleHookArgs.builder()
.name("foobar")
.defaultResult("CONTINUE")
.heartbeatTimeout(2000)
.lifecycleTransition("autoscaling:EC2_INSTANCE_LAUNCHING")
.notificationMetadata(serializeJson(
jsonObject(
jsonProperty("foo", "bar")
)))
.notificationTargetArn("arn:aws:sqs:us-east-1:444455556666:queue1*")
.roleArn("arn:aws:iam::123456789012:role/S3Access")
.build())
.tags(
GroupTagArgs.builder()
.key("foo")
.value("bar")
.propagateAtLaunch(true)
.build(),
GroupTagArgs.builder()
.key("lorem")
.value("ipsum")
.propagateAtLaunch(false)
.build())
.timeouts(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
}
}

With Latest Version Of Launch Template

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foobar = new LaunchTemplate("foobar", LaunchTemplateArgs.builder()
.namePrefix("foobar")
.imageId("ami-1a2b3c")
.instanceType("t2.micro")
.build());
var bar = new Group("bar", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.launchTemplate(GroupLaunchTemplateArgs.builder()
.id(foobar.id())
.version("$Latest")
.build())
.build());
}
}

Mixed Instances Policy

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c3.large")
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}

Mixed Instances Policy with Spot Instances and Capacity Rebalance

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyInstancesDistributionArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.capacityRebalance(true)
.desiredCapacity(12)
.maxSize(15)
.minSize(12)
.vpcZoneIdentifiers(
aws_subnet.example1().id(),
aws_subnet.example2().id())
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.instancesDistribution(GroupMixedInstancesPolicyInstancesDistributionArgs.builder()
.onDemandBaseCapacity(0)
.onDemandPercentageAboveBaseCapacity(25)
.spotAllocationStrategy("capacity-optimized")
.build())
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c3.large")
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}

Mixed Instances Policy with Instance level LaunchTemplateSpecification Overrides

When using a diverse instance set, some instance types might require a launch template with configuration values unique to that instance type such as a different AMI (Graviton2), architecture specific user data script, different EBS configuration, or different networking configuration.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var example2 = new LaunchTemplate("example2", LaunchTemplateArgs.builder()
.namePrefix("example2")
.imageId(data.aws_ami().example2().id())
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c4.large")
.weightedCapacity("3")
.build(),
GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceType("c6g.large")
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(example2.id())
.build())
.weightedCapacity("2")
.build())
.build())
.build())
.build());
}
}

Mixed Instances Policy with Attribute-based Instance Type Selection

As an alternative to manually choosing instance types when creating a mixed instances group, you can specify a set of instance attributes that describe your compute requirements.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(1)
.minSize(1)
.mixedInstancesPolicy(GroupMixedInstancesPolicyArgs.builder()
.launchTemplate(GroupMixedInstancesPolicyLaunchTemplateArgs.builder()
.launchTemplateSpecification(GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs.builder()
.launchTemplateId(exampleLaunchTemplate.id())
.build())
.overrides(GroupMixedInstancesPolicyLaunchTemplateOverrideArgs.builder()
.instanceRequirements(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs.builder()
.memoryMib(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs.builder()
.min(1000)
.build())
.vcpuCount(GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs.builder()
.min(4)
.build())
.build())
.build())
.build())
.build())
.build());
}
}

Automatically refresh all instances after the group is updated

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetAmiArgs;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupLaunchTemplateArgs;
import com.pulumi.aws.autoscaling.inputs.GroupTagArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshArgs;
import com.pulumi.aws.autoscaling.inputs.GroupInstanceRefreshPreferencesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleAmi = Ec2Functions.getAmi(GetAmiArgs.builder()
.mostRecent(true)
.owners("amazon")
.filters(GetAmiFilterArgs.builder()
.name("name")
.values("amzn-ami-hvm-*-x86_64-gp2")
.build())
.build());
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.imageId(exampleAmi.applyValue(getAmiResult -> getAmiResult.id()))
.instanceType("t3.nano")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(2)
.minSize(1)
.launchTemplate(GroupLaunchTemplateArgs.builder()
.id(exampleLaunchTemplate.id())
.version(exampleLaunchTemplate.latestVersion())
.build())
.tags(GroupTagArgs.builder()
.key("Key")
.value("Value")
.propagateAtLaunch(true)
.build())
.instanceRefresh(GroupInstanceRefreshArgs.builder()
.strategy("Rolling")
.preferences(GroupInstanceRefreshPreferencesArgs.builder()
.minHealthyPercentage(50)
.build())
.triggers("tag")
.build())
.build());
}
}

Auto Scaling group with Warm Pool

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.LaunchTemplate;
import com.pulumi.aws.ec2.LaunchTemplateArgs;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolArgs;
import com.pulumi.aws.autoscaling.inputs.GroupWarmPoolInstanceReusePolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLaunchTemplate = new LaunchTemplate("exampleLaunchTemplate", LaunchTemplateArgs.builder()
.namePrefix("example")
.imageId(data.aws_ami().example().id())
.instanceType("c5.large")
.build());
var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.availabilityZones("us-east-1a")
.desiredCapacity(1)
.maxSize(5)
.minSize(1)
.warmPool(GroupWarmPoolArgs.builder()
.poolState("Hibernated")
.minSize(1)
.maxGroupPreparedCapacity(10)
.instanceReusePolicy(GroupWarmPoolInstanceReusePolicyArgs.builder()
.reuseOnScaleIn(true)
.build())
.build())
.build());
}
}

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](https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingGroupLifecycle.html) for more information on an ASG's lifecycle. This provider will wait for healthy instances for up to wait_for_capacity_timeout. If ASG creation is taking more than a few minutes, it's worth investigating for scaling activity errors, which can be caused by problems with the selected Launch Configuration. Setting wait_for_capacity_timeout to "0" disables ASG Capacity waiting.

Waiting for ELB Capacity

The second mechanism is optional, and affects ASGs with attached ELBs specified via the load_balancers attribute or with ALBs specified with target_group_arns. The min_elb_capacity parameter causes the provider to wait for at least the requested number of instances to show up "InService" in all attached ELBs during ASG creation. It has no effect on ASG updates. If wait_for_elb_capacity is set, the provider will wait for exactly that number of Instances to be "InService" in all attached ELBs on both creation and updates. These parameters can be used to ensure that service is being provided before the provider moves on. If new instances don't pass the ELB's health checks for any reason, the apply will time out, and the ASG will be marked as tainted (i.e., marked to be destroyed in a follow up run). As with ASG Capacity, the provider will wait for up to wait_for_capacity_timeout for the proper number of instances to be healthy.

Troubleshooting Capacity Waiting Timeouts

If ASG creation takes more than a few minutes, this could indicate one of a number of configuration problems. See the [AWS Docs on Load Balancer

  • Troubleshooting](https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-troubleshooting.html) for more information.

Import

Auto Scaling Groups can be imported using the name, e.g.,

$ pulumi import aws:autoscaling/group:Group web web-asg

Properties

Link copied to clipboard
val arn: Output<String>

ARN for this Auto Scaling Group

Link copied to clipboard

List of one or more availability zones for the group. Used for EC2-Classic, attaching a network interface via id from a launch template and default subnets when not specified with vpc_zone_identifier argument. Conflicts with vpc_zone_identifier.

Link copied to clipboard

Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.

Link copied to clipboard
val context: Output<String>?

Reserved.

Link copied to clipboard
val defaultCooldown: Output<Int>

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

Link copied to clipboard

Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See Set the default instance warmup for an Auto Scaling group)

Link copied to clipboard
val desiredCapacity: Output<Int>

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

Link copied to clipboard

The unit of measurement for the value specified for desired_capacity. Supported for attribute-based instance type selection only. Valid values: "units", "vcpu", "memory-mib".

Link copied to clipboard
val enabledMetrics: Output<List<String>>?

List of metrics to collect. The allowed values are defined by the underlying AWS API.

Link copied to clipboard
val forceDelete: Output<Boolean>?

Allows deleting the Auto Scaling Group without waiting for all instances in the pool to terminate. You can force an Auto Scaling Group to delete even if it's in the process of scaling a resource. Normally, this provider drains all the instances before deleting the group. This bypasses that behavior and potentially leaves resources dangling.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
val healthCheckType: Output<String>

"EC2" or "ELB". Controls how health checking is done.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

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

Link copied to clipboard

If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.

Link copied to clipboard

Name of the launch configuration to use.

Link copied to clipboard

Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details.

Link copied to clipboard
val loadBalancers: Output<List<String>>?

List of elastic load balancer names to add to the autoscaling group names. Only valid for classic load balancers. For ALBs, use target_group_arns instead.

Link copied to clipboard
val maxInstanceLifetime: Output<Int>?

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

Link copied to clipboard
val maxSize: Output<Int>

Maximum size of the Auto Scaling Group.

Link copied to clipboard

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

Link copied to clipboard
val minElbCapacity: Output<Int>?

Setting this causes the provider to wait for this number of instances from this Auto Scaling Group to show up healthy in the ELB only on creation. Updates will not wait on ELB instance number changes. (See also Waiting for Capacity below.)

Link copied to clipboard
val minSize: Output<Int>

Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)

Link copied to clipboard

Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details.

Link copied to clipboard
val name: Output<String>

Name of the Auto Scaling Group. By default generated by the provider. Conflicts with name_prefix.

Link copied to clipboard
val namePrefix: Output<String>

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

Link copied to clipboard
val placementGroup: Output<String>?

Name of the placement group into which you'll launch your instances, if any.

Link copied to clipboard
val predictedCapacity: Output<Int>

Predicted capacity of the group.

Link copied to clipboard

Whether newly launched instances are automatically protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
val tags: Output<List<GroupTag>>?

Configuration block(s) containing resource tags. Conflicts with tags. See Tag below for more details.

Link copied to clipboard

Set of maps containing resource tags. Conflicts with tag. See Tags below for more details.

Link copied to clipboard
val targetGroupArns: Output<List<String>>?

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

Link copied to clipboard

List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy, Default. Additionally, the ARN of a Lambda function can be specified for custom termination policies.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with availability_zones.

Link copied to clipboard

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

Link copied to clipboard
val waitForElbCapacity: Output<Int>?

Setting this will cause the provider to wait for exactly this number of healthy instances from this Auto Scaling Group in all attached load balancers on both create and update operations. (Takes precedence over min_elb_capacity behavior.) (See also Waiting for Capacity below.)

Link copied to clipboard
val warmPool: Output<GroupWarmPool>?

If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below

Link copied to clipboard
val warmPoolSize: Output<Int>

Current size of the warm pool.