added placement group as an option for autoscaling groups

This commit is contained in:
Sunil K Chopra 2015-10-30 16:45:19 -05:00
parent 8ff8f17add
commit 006cac56a2
1 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,13 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
Set: schema.HashString,
},
"placement_group": &schema.Schema{
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
},
"load_balancers": &schema.Schema{
Type: schema.TypeSet,
Optional: true,
@ -175,6 +182,11 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{})
autoScalingGroupOpts.HealthCheckGracePeriod = aws.Int64(int64(v.(int)))
}
if v, ok := d.GetOk("placement_group"); ok && v.(*schema.Set).Len() > 0 {
autoScalingGroupOpts.PlacementGroup = expandStringList(
v.(*schema.Set).List())
}
if v, ok := d.GetOk("load_balancers"); ok && v.(*schema.Set).Len() > 0 {
autoScalingGroupOpts.LoadBalancerNames = expandStringList(
v.(*schema.Set).List())