asg

foss-cafe/asg/aws

Terraform Module HCL AWS

Terraform module for AWS Auto scaling group

Install
module "asg" {
source = "foss-cafe/asg/aws"
version = "1.1.0"
}
plain text: /constructs/tfmod-foss-cafe-asg-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform Module for AWS Auto Scaling Group Use as a Module Go tot examples dir for more examples ``terrraform module "asg_1" { source = "../" name = "example" image_id = "ami-01fee56b22f308154" instance_type = "t2.micro" key_name = "test" user_data = file("${path.module}/install.sh") root_block_device = [ { volume_size = "25" volume_type = "gp2" delete_on_termination = true encrypted = true }, ] vpc_id = var.vpc_id ingress = var.ingress egress = var.egress vpc_zone_identifier = var.vpc_zone_identifier min_size = 0 max_size = 1 desired_capacity = 1 wait_for_capacity_timeout = 0 service_linked_role_arn = aws_iam_service_linked_role.autoscaling.arn tags = { extra_tag1 = "extra_value1" extra_tag2 = "extra_value2" } } ` Requirements | Name | Version | |------|---------| | terraform | >= 0.12.7

Inputs (50)
NameTypeDescriptionDefault
instance_typestringThe size of instance to launch required
placement_groupstringThe name of the placement group into which you'll launch your instances, if any required
key_namestringThe key name that should be used for the instance required
min_adjustment_magnitudestring(Optional) Minimum value to scale by when adjustment_type is set to PercentChang required
user_data_base64stringCan be used instead of user_data to pass base64-encoded binary data directly required
credit_specificationobject({ cpu_credits = strCustomize the credit specification of the instances required
user_datastring The user data to provide when launching the instance. Do not pass gzip-compress required
iam_instance_profilestringThe name attribute of the IAM instance profile to associate with launched instan required
default_versionnumberDefault Version of the launch template. required
namestring(Optional) The name of the launch configuration. If you leave this blank, Terraf required
image_idstringThe EC2 image ID to launch required
enable_launch_templateboolDo you want to enable launch_templatetrue
metadata_optionslist(map(string))(Optional) Customize the metadata options for the instance.[]
enable_autoscaling_policyboolDo you want to enable ASG Policyfalse
target_group_arnslist(string)A list of aws_alb_target_group ARNs, for use with Application Load Balancing[]
egressany(Optional, VPC only) Can be specified multiple times for each egress rule.[]
vpc_zone_identifierlist(string)A list of subnet IDs to launch resources in[]
service_linked_role_arnstringThe ARN of the service-linked role that the ASG will use to call other AWS servi""
initial_lifecycle_hooklist(map(string))(Optional) One or more Lifecycle Hooks to attach to the autoscaling group before[]
instance_initiated_shutdown_behaviorstringShutdown behavior for the instances. Can be `stop` or `terminate`"terminate"
tagsmap(string)A map of tags and values in the same format as other resources accept. This will{}
load_balancerslist(string)A list of elastic load balancer names to add to the autoscaling group names[]
enable_autoscaling_groupboolDo you want to enable Auto scaling groupfalse
min_sizenumberThe minimum size of the auto scale group"1"
termination_policieslist(string)A list of policies to decide how the instances in the auto scale group should be[ "Default" ]
enable_monitoringboolEnables/disables detailed monitoring. This is enabled by default.false
health_check_grace_periodnumberTime (in seconds) after instance comes into service before checking health.300
adjustment_typestring (Optional) Specifies whether the adjustment is an absolute number or a percenta"ExactCapacity"
cooldownnumber (Optional) The amount of time, in seconds, after a scaling activity completes a300
associate_public_ip_addressboolAssociate a public ip address with an instance in a VPC.false
desired_capacitynumberThe number of Amazon EC2 instances that should be running in the group"1"
… and 10 more inputs
Outputs (15)
launch_configuration_arn — The name of the launch configuration
asg_simple_scaling_policy_adjustment_type — The scaling policy's adjustment type.
launch_configuration_id — The ID of the launch configuration
asg_target_tracking_policy_arns — The ARN assigned by AWS to the scaling policy.
asg_simple_scaling_policy_arn — The ARN assigned by AWS to the scaling policy.
asg_simple_scaling_policy — The scaling policy's type.
asg_target_tracking_policy_adjustment_types — The scaling policy's adjustment type.
sg_id — The ID of the security group
asg_target_tracking_policy_names — The scaling policy's name.
asg_simple_scaling_policy_names — The scaling policy's name.
asg_target_tracking_policys — The scaling policy's type.
launch_configuration_name — The name of the launch configuration
asg_id — The autoscaling group id
asg_arn — The ARN for this AutoScaling Group
sg_arn — The ID of the security group
Resources (6)
aws_autoscaling_groupaws_autoscaling_policyaws_launch_configurationaws_launch_templateaws_security_groupnull_resource
Details
FrameworkTerraform Module
LanguageHCL
Version1.1.0
Cloud AWS
★ Stars0
Forks1
Total downloads6.0k
Inputs50
Outputs15
Resources6
Examples3
Namespacefoss-cafe
Updated