AwsAutoScalingGroupArgs
interface AwsAutoScalingGroupArgs extends Omit<aws.autoscaling.GroupArgs, 'forceDelete' | 'forceDeleteWarmPool' | 'enabledMetrics' | 'availabilityZones' | 'healthCheckGracePeriod' | 'healthCheckType' | 'ignoreFailedScalingActivities' | 'launchConfiguration' | 'launchTemplate' | 'loadBalancers' | 'minElbCapacity' | 'mixedInstancesPolicy' | 'name' | 'namePrefix' | 'protectFromScaleIn' | 'region' | 'suspendedProcesses' | 'tags' | 'targetGroupArns' | 'trafficSources' | 'vpcZoneIdentifiers' | 'waitForCapacityTimeout' | 'waitForElbCapacity'> {
availabilityZoneDistribution?: Input<GroupAvailabilityZoneDistribution | undefined>;
capacityRebalance?: Input<boolean | undefined>;
capacityReservationSpecification?: Input<GroupCapacityReservationSpecification | undefined>;
context?: Input<string | undefined>;
defaultCooldown?: Input<number | undefined>;
defaultInstanceWarmup?: Input<number | undefined>;
desiredCapacity?: Input<number | undefined>;
desiredCapacityType?: Input<string | undefined>;
enableMetricsCollection?: Input<boolean>;
healthCheckGracePeriod?: Input<number>;
identity: string;
initialLifecycleHooks?: Input<Input<GroupInitialLifecycleHook>[] | undefined>;
instanceLifecyclePolicy?: Input<GroupInstanceLifecyclePolicy | undefined>;
instanceMaintenancePolicy?: Input<GroupInstanceMaintenancePolicy | undefined>;
instanceRefresh?: Input<GroupInstanceRefresh | undefined>;
launchTemplate: AwsLaunchTemplate;
launchTemplateVersion?: AwsAutoScalingGroupLaunchTemplateVersion;
maxInstanceLifetime?: Input<number | undefined>;
maxSize: Input<number>;
metricsGranularity?: Input<string | undefined>;
minSize: Input<number>;
mixedInstancesPolicy?: AwsAutoScalingGroupMixedInstancesPolicyArgs;
network: AwsAutoScalingGroupNetworkArgs;
placementGroup?: Input<string | PlacementGroup | undefined>;
protectFromScaleIn?: Input<boolean>;
serviceLinkedRoleArn?: Input<string | undefined>;
suspendedProcesses?: Input<Input<'AZRebalance' | 'InstanceRefresh'>[]>;
tags?: Input<Record<string, Input<string>>>;
targetGroups?: Input<Input<AwsAutoScalingGroupTargetGroupInput>[]>;
terminationPolicies?: Input<Input<string>[] | undefined>;
warmPool?: Input<GroupWarmPool | undefined>;
}Input arguments for AwsAutoScalingGroup.
Remarks
The component creates an Auto Scaling Group from an AwsLaunchTemplate. It supports the capacity, health-check, termination, metrics, warm-pool, maintenance, refresh, placement, capacity-reservation, lifecycle-hook, and target-group options accepted by the AWS provider, except settings the component owns for safe orchestration, including subnet placement. Supply exactly one explicit placement mode through network.
identity is a stable Pulumi-only identity. AWS Auto Scaling Group names use the stackOnly pattern ${env}-${projectHash} because the resource type supplies its own service context.
Example
const group = new AwsAutoScalingGroup({
identity: 'api-workers',
launchTemplate: workersTemplate,
minSize: 2,
maxSize: 6,
network: { subnetIds: applicationSubnetIds },
});Hierarchy
GroupArgs, "forceDelete" | "forceDeleteWarmPool" | "enabledMetrics" | "availabilityZones" | "healthCheckGracePeriod" | "healthCheckType" | "ignoreFailedScalingActivities" | "launchConfiguration" | "launchTemplate" | "loadBalancers" | "minElbCapacity" | "mixedInstancesPolicy" | "name" | "namePrefix" | "protectFromScaleIn" | "region" | "suspendedProcesses" | "tags" | "targetGroupArns" | "trafficSources" | "vpcZoneIdentifiers" | "waitForCapacityTimeout" | "waitForElbCapacity">AwsAutoScalingGroupArgs
Properties
availabilityZoneDistribution: Input<GroupAvailabilityZoneDistribution | undefined>
Inherited from availabilityZoneDistribution
The instance capacity distribution across Availability Zones. See Availability Zone Distribution below for more details.
capacityRebalance: Input<boolean | undefined>
Inherited from capacityRebalance
Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled.
capacityReservationSpecification: Input<GroupCapacityReservationSpecification | undefined>
Inherited from capacityReservationSpecification
The capacity reservation specification for the Auto Scaling group allows you to prioritize launching into On-Demand Capacity Reservations. See Capacity Reservation Specification below for more details.
context: Input<string | undefined>
Inherited from context
Reserved.
defaultCooldown: Input<number | undefined>
Inherited from defaultCooldown
Amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
defaultInstanceWarmup: Input<number | undefined>
Inherited from defaultInstanceWarmup
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)
desiredCapacity: Input<number | undefined>
Inherited from desiredCapacity
Number of Amazon EC2 instances that should be running in the group. (See also Waiting for Capacity below.)
desiredCapacityType: Input<string | undefined>
Inherited from desiredCapacityType
The unit of measurement for the value specified for desiredCapacity. Supported for attribute-based instance type selection only. Valid values: "units", "vcpu", "memory-mib".
enableMetricsCollection: Input<boolean>
Enables the complete one-minute Auto Scaling Group metric set.
Default: `false`.
healthCheckGracePeriod: Input<number>
Time in seconds after entering InService before applicable health-check failures can replace an instance. A non-running EC2 state can still trigger immediate replacement.
Default: `300`
identity: string
Stable plain-string identity used exclusively for Pulumi logical names.
initialLifecycleHooks: Input<Input<GroupInitialLifecycleHook>[] | undefined>
Inherited from initialLifecycleHooks
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 autoscalingGroupName 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.
instanceLifecyclePolicy: Input<GroupInstanceLifecyclePolicy | undefined>
Inherited from instanceLifecyclePolicy
If this block is configured, adds an instance lifecycle policy to the specified Auto Scaling Group. Defined below.
instanceMaintenancePolicy: Input<GroupInstanceMaintenancePolicy | undefined>
Inherited from instanceMaintenancePolicy
If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below.
instanceRefresh: Input<GroupInstanceRefresh | undefined>
Inherited from instanceRefresh
If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated. Defined below.
launchTemplate: AwsLaunchTemplate
Launch-template component used by this group.
launchTemplateVersion: AwsAutoScalingGroupLaunchTemplateVersion
Launch-template version.
Default: `latest`, resolved from `launchTemplate.latestVersion` so template changes are observable.
maxInstanceLifetime: Input<number | undefined>
Inherited from maxInstanceLifetime
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.
maxSize: Input<number>
Inherited from maxSize
Maximum size of the Auto Scaling Group.
metricsGranularity: Input<string | undefined>
Inherited from metricsGranularity
Granularity to associate with the metrics to collect. The only valid value is 1Minute. Default is 1Minute.
minSize: Input<number>
Inherited from minSize
Minimum size of the Auto Scaling Group. (See also Waiting for Capacity below.)
mixedInstancesPolicy: AwsAutoScalingGroupMixedInstancesPolicyArgs
Optional mixed-instance configuration. It replaces the standard launch-template mode.
network: AwsAutoScalingGroupNetworkArgs
Required Auto Scaling Group placement. Select subnet IDs directly or resolve subnet Name tags within one named VPC.
placementGroup: Input<string | PlacementGroup | undefined>
Inherited from placementGroup
Name of the placement group into which you'll launch your instances, if any.
protectFromScaleIn: Input<boolean>
Enables instance scale-in protection.
Default: `false`.
serviceLinkedRoleArn: Input<string | undefined>
Inherited from serviceLinkedRoleArn
ARN of the service-linked role that the ASG will use to call other AWS services
suspendedProcesses: Input<Input<'AZRebalance' | 'InstanceRefresh'>[]>
Processes to suspend. Alarm, load-balancer, launch, terminate, and health-related processes are forbidden.
tags: Input<Record<string, Input<string>>>
Additional tags. Name is component-controlled and cannot be overridden.
targetGroups: Input<Input<AwsAutoScalingGroupTargetGroupInput>[]>
Target groups attached to the group. Supplying target groups enables ELB health checks.
terminationPolicies: Input<Input<string>[] | undefined>
Inherited from terminationPolicies
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.
warmPool: Input<GroupWarmPool | undefined>
Inherited from warmPool
If this block is configured, add a Warm Pool to the specified Auto Scaling group. Defined below