Module autoscaling

@pulumi/awsx > autoscaling

class AutoScalingGroup

extends ComponentResource

constructor

new AutoScalingGroup(name: string, args: AutoScalingGroupArgs, opts: pulumi.ComponentResourceOptions)

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

property launchConfiguration

public launchConfiguration: AutoScalingLaunchConfiguration;

The launch configuration for this auto scaling group.

property stack

public stack: aws.cloudformation.Stack;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property vpc

public vpc: x.ec2.Vpc;

class AutoScalingLaunchConfiguration

extends ComponentResource

constructor

new AutoScalingLaunchConfiguration(name: string, vpc: x.ec2.Vpc, args: AutoScalingLaunchConfigurationArgs, opts: pulumi.ComponentResourceOptions)

method createInstanceProfile

public static createInstanceProfile(name: string, assumeRolePolicy?: string | aws.iam.PolicyDocument, policyArns?: string[], opts?: pulumi.ComponentResourceOptions): InstanceProfile

Creates the [instanceProfile] for a [ClusterAutoScalingLaunchConfiguration] if not provided explicitly. If [assumeRolePolicy] is provided it will be used when creating the task, otherwise [defaultInstanceProfilePolicyDocument] will be used. If [policyArns] are provided, they will be used to create [RolePolicyAttachment]s for the Role. Otherwise, [defaultInstanceProfilePolicyARNs] will be used.

method defaultInstanceProfilePolicyARNs

public static defaultInstanceProfilePolicyARNs(): string[]

method defaultInstanceProfilePolicyDocument

public static defaultInstanceProfilePolicyDocument(): aws.iam.PolicyDocument

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method registerOutputs

protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): void

property id

public id: pulumi.Output<string>;

property instanceProfile

public instanceProfile: aws.iam.InstanceProfile;

property launchConfiguration

public launchConfiguration: aws.ec2.LaunchConfiguration;

property securityGroups

public securityGroups: x.ec2.SecurityGroup[];

property stackName

public stackName: pulumi.Output<string>;

Name to give the auto-scaling-group’s cloudformation stack name.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface AutoScalingGroupArgs

property launchConfiguration

launchConfiguration?: AutoScalingLaunchConfiguration;

The config to use when creating the auto scaling group.

[launchConfiguration] or [launchConfigurationArgs] can be provided. And, if either are provided will be used as the launch configuration for the auto scaling group.

If neither are provided, a default instance will be create by calling [cluster.createAutoScalingConfig()].

property launchConfigurationArgs

launchConfigurationArgs?: AutoScalingLaunchConfigurationArgs;

The config to use when creating the auto scaling group.

[launchConfiguration] or [launchConfigurationArgs] can be provided. And, if either are provided will be used as the launch configuration for the auto scaling group.

If neither are provided, a default instance will be create by calling [cluster.createAutoScalingConfig()].

property subnetIds

subnetIds?: pulumi.Input<string>[];

The subnets to use for the autoscaling group. If not provided, the private subnets of the vpc will be used.

property templateParameters

templateParameters?: pulumi.Input<TemplateParameters>;

Parameters to control the cloud formation stack template that is created. If not provided the defaults specified in TemplateParameters will be used.

property vpc

vpc?: x.ec2.Vpc;

The vpc this autoscaling group is for. If not provided this autoscaling group will be created for the default vpc.

interface AutoScalingLaunchConfigurationArgs

The set of arguments when creating the launch configuration for a cluster’s autoscaling group.

property associatePublicIpAddress

associatePublicIpAddress?: pulumi.Input<boolean>;

Associate a public ip address with an instance in a VPC.

property ebsBlockDevices

ebsBlockDevices?: undefined | {
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
} | Promise<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}> | OutputInstance<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}>[] | Promise<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
} | Promise<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}> | OutputInstance<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}>[]> | OutputInstance<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
} | Promise<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}> | OutputInstance<{
    deleteOnTermination: pulumi.Input<boolean>;
    deviceName: pulumi.Input<string>;
    encrypted: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    noDevice: pulumi.Input<boolean>;
    snapshotId: pulumi.Input<string>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}>[]>;

Additional EBS block devices to attach to the instance. See Block Devices below for details.

If not provided, a 5gb ‘gp2’ device will be mounted at ‘/dev/xvdb’ and a 50gb ‘gp2’ device will be mounted at ‘/dev/xvdcz’. Both devices will be deleted upon termination.

property ebsOptimized

ebsOptimized?: pulumi.Input<boolean>;

If true, the launched EC2 instance will be EBS-optimized.

property ecsOptimizedAMIName

ecsOptimizedAMIName?: undefined | string;

The name of the ECS-optimzed AMI to use for the Container Instances in this cluster, e.g. “amzn-ami-2017.09.l-amazon-ecs-optimized”. Defaults to using the latest recommended ECS Linux Optimized AMI, which may change over time and cause recreation of EC2 instances when new versions are release. To control when these changes are adopted, set this parameter explicitly to the version you would like to use.

See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html for valid values.

property enableMonitoring

enableMonitoring?: pulumi.Input<boolean>;

Enables/disables detailed monitoring. This is enabled by default.

property ephemeralBlockDevices

ephemeralBlockDevices?: undefined | {
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
} | Promise<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}> | OutputInstance<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}>[] | Promise<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
} | Promise<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}> | OutputInstance<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}>[]> | OutputInstance<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
} | Promise<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}> | OutputInstance<{
    deviceName: pulumi.Input<string>;
    virtualName: pulumi.Input<string>;
}>[]>;

Customize Ephemeral (also known as “Instance Store”) volumes on the instance. See Block Devices below for details.

property iamInstanceProfile

iamInstanceProfile?: pulumi.Input<string | aws.iam.InstanceProfile>;

The name attribute of the IAM instance profile to associate with launched instances.

property instanceProfile

instanceProfile?: aws.iam.InstanceProfile;

The instance profile to use for the autoscaling group. If not provided, a default one will be created.

property instanceType

instanceType?: pulumi.Input<aws.ec2.InstanceType>;

The size of instance to launch. Defaults to t2.micro if unspecified.

property keyName

keyName?: pulumi.Input<string>;

The key name that should be used for the instance.

property name

name?: pulumi.Input<string>;

The name of the launch configuration. If you leave this blank, Terraform will auto-generate a unique name.

property namePrefix

namePrefix?: pulumi.Input<string>;

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

property placementTenancy

placementTenancy?: pulumi.Input<"default" | "dedicated">;

The tenancy of the instance. Valid values are "default" or "dedicated", see http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_CreateLaunchConfiguration.html for more details. Default is “default” if unspecified.

property rootBlockDevice

rootBlockDevice?: undefined | {
    deleteOnTermination: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
} | Promise<{
    deleteOnTermination: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}> | OutputInstance<{
    deleteOnTermination: pulumi.Input<boolean>;
    iops: pulumi.Input<number>;
    volumeSize: pulumi.Input<number>;
    volumeType: pulumi.Input<string>;
}>;

Customize details about the root block device of the instance. See Block Devices below for details.

If not provided, an 8gb ‘gp2’ root device will be created. This device will be deleted upon termination.

property securityGroups

securityGroups?: x.ec2.SecurityGroupOrId[];

A list of associated security group IDs.

property spotPrice

spotPrice?: pulumi.Input<string>;

The maximum price to use for reserving spot instances.

property stackName

stackName?: pulumi.Input<string>;

The name of the stack the launch configuration will signal.

property userData

userData?: pulumi.Input<string> | AutoScalingUserData;

The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead.

property userDataBase64

userDataBase64?: pulumi.Input<string>;

Can be used instead of user_data to pass base64-encoded binary data directly. Use this instead of user_data whenever the value is not a valid UTF-8 string. For example, gzip-encoded user data must be base64-encoded and passed via this argument to avoid corruption.

property vpcClassicLinkId

vpcClassicLinkId?: pulumi.Input<string>;

The ID of a ClassicLink-enabled VPC. Only applies to EC2-Classic instances. (eg. vpc-2730681a)

property vpcClassicLinkSecurityGroups

vpcClassicLinkSecurityGroups?: pulumi.Input<pulumi.Input<string>[]>;

The IDs of one or more security groups for the specified ClassicLink-enabled VPC (eg. sg-46ae3d11).

interface AutoScalingUserData

method extraBootcmdLines

extraBootcmdLines(): pulumi.Input<UserDataLine[]>

Additional lines to be placed in the bootcmd section of the launch configuration.

method extraRuncmdLines

extraRuncmdLines(): pulumi.Input<UserDataLine[]>

Additional lines to be placed in the runcmd section of the launch configuration.

interface TemplateParameters

property defaultCooldown

defaultCooldown?: pulumi.Input<number>;

The amount of time, in seconds, after a scaling activity completes before another scaling activity can start. Defaults to 300 if unspecified.

property healthCheckGracePeriod

healthCheckGracePeriod?: pulumi.Input<number>;

Time (in seconds) after instance comes into service before checking health. Defaults to 120 if unspecified.

property healthCheckType

healthCheckType?: pulumi.Input<"EC2" | "ELB">;

“EC2” or “ELB”. Controls how health checking is done. Defaults to “EC2” if unspecified.

property maxSize

maxSize?: pulumi.Input<number>;

The maximum size of the auto scale group. Defaults to 100 if unspecified.

property minSize

minSize?: pulumi.Input<number>;

The minimum size of the auto scale group. Defaults to 100 if unspecified.

property suspendedProcesses

suspendedProcesses?: pulumi.Input<pulumi.Input<"Launch" | "Terminate" | "HealthCheck" | "ReplaceUnhealthy" | "AZRebalance" | "AlarmNotification" | "ScheduledActions" | "AddToLoadBalancer">[]>;

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

Defaults to “ScheduledActions” if not specified

interface UserDataLine

A line that should be added to the [userData] section of a LaunchConfiguration template.

property automaticallyIndent

automaticallyIndent?: undefined | false | true;

Whether the line should be automatically indented to the right level. Defaults to [true]. Set explicitly to [false] to control all indentation.

property contents

contents: string;

Actual contents of the line.