github.com/markdia/terraform@v0.5.1-0.20150508012022-f1ae920aa970/website/source/docs/providers/aws/r/autoscale.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_autoscaling_group" 4 sidebar_current: "docs-aws-resource-autoscale" 5 description: |- 6 Provides an AutoScaling Group resource. 7 --- 8 9 # aws\_autoscaling\_group 10 11 Provides an AutoScaling Group resource. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_autoscaling_group" "bar" { 17 availability_zones = ["us-east-1a"] 18 name = "foobar3-terraform-test" 19 max_size = 5 20 min_size = 2 21 health_check_grace_period = 300 22 health_check_type = "ELB" 23 desired_capacity = 4 24 force_delete = true 25 launch_configuration = "${aws_launch_configuration.foobar.name}" 26 27 tag { 28 key = "foo" 29 value = "bar" 30 propagate_at_launch = true 31 } 32 tag { 33 key = "lorem" 34 value = "ipsum" 35 propagate_at_launch = false 36 } 37 } 38 ``` 39 40 ## Argument Reference 41 42 The following arguments are supported: 43 44 * `name` - (Required) The name of the auto scale group. 45 * `max_size` - (Required) The maximum size of the auto scale group. 46 * `min_size` - (Required) The minimum size of the auto scale group. Terraform 47 waits after ASG creation for this number of healthy instances to show up in 48 the ASG before continuing. Currently, it will wait for a maxiumum of 10m, if 49 ASG creation is taking more than a few minutes, it's worth investigating for 50 scaling actvity errors caused by problems with the selected Launch 51 Configuration. 52 * `availability_zones` - (Required) A list of AZs to launch resources in. 53 * `launch_configuration` - (Required) The ID of the launch configuration to use. 54 * `health_check_grace_period` - (Optional) Time after instance comes into service before checking health. 55 * `health_check_type` - (Optional) "EC2" or "ELB". Controls how health checking is done. 56 * `desired_capacity` - (Optional) The number of Amazon EC2 instances that 57 should be running in the group. (If this is specified, Terraform will wait for 58 this number of healthy instances after ASG creation instead of `min_size`.) 59 * `force_delete` - (Optional) Allows deleting the autoscaling group without waiting 60 for all instances in the pool to terminate. 61 * `load_balancers` (Optional) A list of load balancer names to add to the autoscaling 62 group names. 63 * `vpc_zone_identifier` (Optional) A list of subnet IDs to launch resources in. 64 * `termination_policies` (Optional) A list of policies to decide how the instances in the auto scale group should be terminated. 65 * `tag` (Optional) A list of tag blocks. Tags documented below. 66 67 Tags support the following: 68 69 * `key` - (Required) Key 70 * `value` - (Required) Value 71 * `propagate_at_launch` - (Required) Enables propagation of the tag to 72 Amazon EC2 instances launched via this ASG 73 74 ## Attributes Reference 75 76 The following attributes are exported: 77 78 * `id` - The autoscaling group name. 79 * `availability_zones` - The availability zones of the autoscale group. 80 * `min_size` - The minimum size of the autoscale group 81 * `max_size` - The maximum size of the autoscale group 82 * `default_cooldown` - Time between a scaling activity and the succeeding scaling activity. 83 * `name` - The name of the autoscale group 84 * `health_check_grace_period` - Time after instance comes into service before checking health. 85 * `health_check_type` - "EC2" or "ELB". Controls how health checking is done. 86 * `desired_capacity` -The number of Amazon EC2 instances that should be running in the group. 87 * `launch_configuration` - The launch configuration of the autoscale group 88 * `vpc_zone_identifier` - The VPC zone identifier 89 * `load_balancers` (Optional) The load balancer names associated with the 90 autoscaling group.