providers/aws: support updating ASG launch config [GH-904]

This commit is contained in:
Mitchell Hashimoto 2015-02-17 15:48:15 -08:00
parent e9778c85a5
commit b5df47efc9
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,6 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
"launch_configuration": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"desired_capacity": &schema.Schema{
@ -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