github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/alicloud/r/ess_scaling_group.html.markdown (about) 1 --- 2 layout: "alicloud" 3 page_title: "Alicloud: alicloud_ess_scaling_group" 4 sidebar_current: "docs-alicloud-resource-ess-scaling-group" 5 description: |- 6 Provides a ESS scaling group resource. 7 --- 8 9 # alicloud\_ess\_scaling\_group 10 11 Provides a ESS scaling group resource. 12 13 ## Example Usage 14 15 ``` 16 resource "alicloud_ess_scaling_group" "scaling" { 17 min_size = 1 18 max_size = 2 19 removal_policies = ["OldestInstance", "NewestInstance"] 20 } 21 ``` 22 23 ## Argument Reference 24 25 The following arguments are supported: 26 27 * `min_size` - (Required) Minimum number of ECS instances in the scaling group. Value range: [0, 100]. 28 * `max_size` - (Required) Maximum number of ECS instances in the scaling group. Value range: [0, 100]. 29 * `scaling_group_name` - (Optional) Name shown for the scaling group, which must contain 2-40 characters (English or Chinese). If this parameter is not specified, the default value is ScalingGroupId. 30 * `default_cooldown` - (Optional) Default cool-down time (in seconds) of the scaling group. Value range: [0, 86400]. The default value is 300s. 31 * `vswitch_id` - (Optional) The virtual switch ID which the ecs instance to be create in. 32 * `removal_policies` - (Optional) RemovalPolicy is used to select the ECS instances you want to remove from the scaling group when multiple candidates for removal exist. Optional values: 33 - OldestInstance: removes the first ECS instance attached to the scaling group. 34 - NewestInstance: removes the first ECS instance attached to the scaling group. 35 - OldestScalingConfiguration: removes the ECS instance with the oldest scaling configuration. 36 - Default values: OldestScalingConfiguration and OldestInstance. You can enter up to two removal policies. 37 * `db_instance_ids` - (Optional) If an RDS instance is specified in the scaling group, the scaling group automatically attaches the Intranet IP addresses of its ECS instances to the RDS access whitelist. 38 - The specified RDS instance must be in running status. 39 - The specified RDS instance’s whitelist must have room for more IP addresses. 40 * `loadbalancer_ids` - (Optional) If a Server Load Balancer instance is specified in the scaling group, the scaling group automatically attaches its ECS instances to the Server Load Balancer instance. 41 - The Server Load Balancer instance must be enabled. 42 - Health check must be enabled for all listener ports configured for the Server Load Balancer instance; otherwise, creation fails. 43 - The Server Load Balancer instance attached with VPC-type ECS instances cannot be attached to the scaling group. 44 - The default weight of an ECS instance attached to the Server Load Balancer instance is 50. 45 46 ## Attributes Reference 47 48 The following attributes are exported: 49 50 * `id` - The scaling group ID. 51 * `min_size` - The minimum number of ECS instances. 52 * `max_size` - The maximum number of ECS instances. 53 * `scaling_group_name` - The name of the scaling group. 54 * `default_cooldown` - The default cool-down of the scaling group. 55 * `removal_policies` - The removal policy used to select the ECS instance to remove from the scaling group. 56 * `db_instance_ids` - The db instance id which the ECS instance attached to. 57 * `loadbalancer_ids` - The slb instance id which the ECS instance attached to.