Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to aws_autoscaling_group (launch_configuration) forces new resource. #904

Closed
lesaux opened this issue Jan 31, 2015 · 1 comment · Fixed by #991
Closed

update to aws_autoscaling_group (launch_configuration) forces new resource. #904

lesaux opened this issue Jan 31, 2015 · 1 comment · Fixed by #991

Comments

@lesaux
Copy link

lesaux commented Jan 31, 2015

Hello, I would expect terraform to update the autoscaling group when I change the launch_configuration entry, and not to destroy and rebuild it. This is a value I could update in the EC2 console (whereas you cannot edit a launchconfig). In my case this causes an outage of the webservice I am configuring. My current workaround is to add a new autoscaling group and new launch configuration, wait for them to be up, and then delete both the old autoscaling group and the old launch config.
If terraform was to update the autoscaling group and not force a new resource, I would still need to perform some action to spin up instances with the new launch config, and get rid of the old instances.

I can think of several use cases for this, and one good example is that want to update the AMI I am using in this autoscaling group. Maybe be this is not the recommended way to update an AMI in an autoscaling group with terraform? Am I missing something? Thanks.

Below the output of terraform which shows the -/+ instead of the ~

-/+ aws_autoscaling_group.web-servers-autoscaling-new
availability_zones.#: "3" => "3"
availability_zones.1305112097: "us-east-1b" => "us-east-1b"
availability_zones.2762590996: "us-east-1d" => "us-east-1d"
availability_zones.3569565595: "us-east-1a" => "us-east-1a"
default_cooldown: "300" => ""
desired_capacity: "1" => "1"
force_delete: "" => ""
health_check_grace_period: "30" => "30"
health_check_type: "ELB" => "ELB"
launch_configuration: "web-servers-v1" => "web-servers-v2" (forces new resource)
load_balancers.#: "1" => "1"
load_balancers.724870401: "www-example-com" => "www-example-com"
max_size: "5" => "5"
min_size: "1" => "1"
name: "web-servers-autoscaling-new" => "web-servers-autoscaling-new"
termination_policies.#: "0" => ""
vpc_zone_identifier.#: "3" => "3"
vpc_zone_identifier.1903260895: "subnet-aaaaaaaa" => "subnet-aaaaaaaa"
vpc_zone_identifier.3856991568: "subnet-bbbbbbbb" => "subnet-bbbbbbbb"
vpc_zone_identifier.4021483473: "subnet-ccccccccc" => "subnet-ccccccccc"

catsby added a commit that referenced this issue Feb 18, 2015
* master:
  update cHANGELOG
  helper/schema: zero value of a set should be empty
  helper/schema: GetOk now only returns true if set to non-zero value
  update CHANGELOG
  providers/aws: fix bad arg giving wrong type [GH-992]
  update CHANGELOG
  update CHANGELOG
  Update CHANGELOG
  update CHANGELOG
  providers/aws: test for allowing in-place lC update
  providers/aws: support updating ASG launch config [GH-904]
  helper/schema: GetChange shouldn't return true when no change
  helper/schema: empty map values should show up in diff [GH-968]
  helper/schema: clarify test
  helper/schema: show in diff when no config is going to empty set
  config: bare splat variables should not be allowed in provisioners
yahyapo pushed a commit to yahyapo/terraform that referenced this issue Mar 13, 2015
@ghost
Copy link

ghost commented May 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants