From 006cac56a2ff3f21a2507332101d631af347319b Mon Sep 17 00:00:00 2001 From: Sunil K Chopra Date: Fri, 30 Oct 2015 16:45:19 -0500 Subject: [PATCH] added placement group as an option for autoscaling groups --- .../providers/aws/resource_aws_autoscaling_group.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index f457e6dcd..b74b2b6cc 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -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())