From b5df47efc9cd0da69a56b8e94eb0d561cc1eac6d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 17 Feb 2015 15:48:15 -0800 Subject: [PATCH] providers/aws: support updating ASG launch config [GH-904] --- builtin/providers/aws/resource_aws_autoscaling_group.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_autoscaling_group.go b/builtin/providers/aws/resource_aws_autoscaling_group.go index 69faf309c..e15132948 100644 --- a/builtin/providers/aws/resource_aws_autoscaling_group.go +++ b/builtin/providers/aws/resource_aws_autoscaling_group.go @@ -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