Skip to content

Commit

Permalink
providers/aws: support updating ASG launch config [hashicorpGH-904]
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh authored and Yahya Poonawala committed Mar 13, 2015
1 parent b203f08 commit 005ee25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin/providers/aws/resource_aws_autoscaling_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
"launch_configuration": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
},

"desired_capacity": &schema.Schema{
Expand Down Expand Up @@ -214,6 +213,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{})
opts.SetDesiredCapacity = true
}

if d.HasChange("launch_configuration") {
opts.LaunchConfigurationName = d.Get("launch_configuration").(string)
}

if d.HasChange("min_size") {
opts.MinSize = d.Get("min_size").(int)
opts.SetMinSize = true
Expand Down

0 comments on commit 005ee25

Please sign in to comment.