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

changes to initial_lifecycle_hook block of ASG aren't triggering a recreate #4714

Closed
ricoli opened this issue May 31, 2018 · 5 comments · Fixed by #20708
Closed

changes to initial_lifecycle_hook block of ASG aren't triggering a recreate #4714

ricoli opened this issue May 31, 2018 · 5 comments · Fixed by #20708
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Milestone

Comments

@ricoli
Copy link

ricoli commented May 31, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.3

  • provider.aws v1.21.0

Affected Resource(s)

  • aws_autoscaling_group

Terraform Configuration Files

resource "aws_autoscaling_group" "asg" {
...

  initial_lifecycle_hook {
    name                 = "instance_launch"
    default_result       = "ABANDON"
    heartbeat_timeout    = 30
    lifecycle_transition = "autoscaling:EC2_INSTANCE_LAUNCHING"

    notification_target_arn = "<some SNS ARN here>"
    role_arn                = "<some IAM role arn here>"
  }

  lifecycle {
    create_before_destroy = true
  }
}

Expected Behavior

When attempting to set/update a initial_lifecycle_hook in an existing auto scaling group, I would expect that ASG to be recreated, as to apply said hook configuration.

Actual Behavior

A Terraform plan produces an inline update for the hook configuration, which actually does nothing, as this block is only intended for newly created ASGs.

Steps to Reproduce

  1. Have an existing auto scaling group without an initial_lifecycle_hook block
  2. terraform apply it
  3. Modify ASG to have an initial_lifecycle_hook block
  4. terraform plan produces an inline update, and applying it results in nothing getting done.
@bflad bflad added bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service. labels May 31, 2018
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label May 21, 2020
@mkv-ts
Copy link

mkv-ts commented May 27, 2020

I just encountered this today too, so I wouldn't calling this stale.

Deleting the hook from aws web console and then doing a terraform apply does nothing too.
How to get around this issue?

@ghost ghost removed the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label May 27, 2020
@krynczak
Copy link

krynczak commented Apr 9, 2021

I just encountered this today too, so I wouldn't calling this stale.

Deleting the hook from aws web console and then doing a terraform apply does nothing too.
How to get around this issue?

Hey, i've just encountered the same issue on my end and got around it by tainting the ASG.

@github-actions
Copy link

This functionality has been released in v4.8.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 5, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants