ec2-autoscale-group

cloudposse/ec2-autoscale-group/aws

Terraform Module HCL AWS

Terraform module to provision Auto Scaling Group and Launch Template on AWS

Install
module "ec2-autoscale-group" {
source = "cloudposse/ec2-autoscale-group/aws"
version = "0.43.1"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision Auto Scaling Group and Launch Template on AWS. The module also creates AutoScaling Policies and CloudWatch Metric Alarms to monitor CPU utilization on the EC2 instances and scale the number of instance in the AutoScaling Group up or down. If you don't want to use the provided functionality, or want to provide your own policies, disable it by setting the variable autoscaling_policies_enabled to false. At present, although you can set the created AutoScaling Policy type to any legal value, in practice only SimpleScaling is supported. To use a StepScaling or TargetTrackingScaling policy, create it yourself and then pass it in the alarm_actions field of custom_alarms. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multipl

Inputs (50)
NameTypeDescriptionDefault
min_sizenumberThe minimum size of the autoscale group required
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
iam_instance_profile_namestringThe IAM instance profile name to associate with launched instances""
ebs_optimizedboolIf true, the launched EC2 instance will be EBS-optimizedfalse
health_check_typestringControls how health checking is done. Valid values are `EC2` or `ELB`"EC2"
service_linked_role_arnstringThe ARN of the service-linked role that the ASG will use to call other AWS servi""
image_idstringThe EC2 image ID to launch""
scale_down_policy_typestringThe scaling policy type. Currently only `SimpleScaling` is supported"SimpleScaling"
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
update_default_versionboolWhether to update Default version of Launch template each updatefalse
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
key_namestringThe SSH key name that should be used for the instance""
user_datastringThe cleartext user data to be Base64-encoded to provide when launching the insta""
enable_monitoringboolEnable/disable detailed monitoringtrue
protect_from_scale_inboolAllows setting instance protection. The autoscaling group will not select instanfalse
scale_up_scaling_adjustmentnumberThe number of instances by which to scale. `scale_up_adjustment_type` determines1
tag_specifications_resource_typesset(string)List of tag specification resource types to tag. Valid values are instance, volu[ "instance", "volume" ]
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
scale_up_cooldown_secondsnumberThe amount of time, in seconds, after a scaling activity completes and before th300
… and 10 more inputs
Outputs (14)
autoscaling_group_tags — A list of tag settings associated with the AutoScaling Group
autoscaling_group_arn — ARN of the AutoScaling Group
autoscaling_group_min_size — The minimum size of the autoscale group
autoscaling_group_max_size — The maximum size of the autoscale group
autoscaling_group_desired_capacity — The number of Amazon EC2 instances that should be running in the group
autoscaling_group_health_check_grace_period — Time after instance comes into service before checking health
autoscaling_policy_scale_down_arn — ARN of the AutoScaling policy scale down
launch_template_id — The ID of the launch template
launch_template_arn — The ARN of the launch template
autoscaling_group_id — The AutoScaling Group id
autoscaling_group_name — The AutoScaling Group name
autoscaling_group_default_cooldown — Time between a scaling activity and the succeeding scaling activity
autoscaling_group_health_check_type — `EC2` or `ELB`. Controls how health checking is done
autoscaling_policy_scale_up_arn — ARN of the AutoScaling policy scale up
Resources (4)
aws_autoscaling_groupaws_autoscaling_policyaws_cloudwatch_metric_alarmaws_launch_template
Details
FrameworkTerraform Module
LanguageHCL
Version0.43.1
Cloud AWS
★ Stars146
Forks144
Total downloads1.4M
Inputs50
Outputs14
Resources4
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated