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

Destroy ASG when LC is updated in-place #34

Closed
mazzy89 opened this issue Jun 1, 2018 · 7 comments
Closed

Destroy ASG when LC is updated in-place #34

mazzy89 opened this issue Jun 1, 2018 · 7 comments

Comments

@mazzy89
Copy link

mazzy89 commented Jun 1, 2018

One nice "trick" is the fact that once you update the LC, you can trigger a creation of a new ASG. This is done by append to the ASG name the reference to the LC. A discussion about this is here. However with the following module if we decide to create both ASG and LC, this couldn't be achieved. There is any reason behind this choice in the design?

@antonbabenko
Copy link
Member

v2.6.0 has been released and it contains the lifecycle which will make sure that ASG is also recreated before deleting old one as described in the link you posted.

@Rowern
Copy link

Rowern commented Jun 13, 2018

I think what mazzy was trying to tell is that if for instance we use this module for lc and asg creation and we update the lc (for instance the ami), the asg will not get destroyed and re-created.
One way to achieve this would be to use the generated name from the lc.
For now the work around is to use this module two time, one for the lc and one for the asg rendering this module useless for us...

@sdot257
Copy link

sdot257 commented Jun 14, 2018

So, why was this closed? This module doesn't work as intended (unless I'm missing it's use case) because changes to the LC does does not spawn a new ASG. I'm not sure the 'name_prefix` is the correct option to use.

@Rowern
Copy link

Rowern commented Jun 15, 2018

Indeed, this issue should be re-open @antonbabenko

@antonbabenko
Copy link
Member

Thank you all for raising this issue here.

v2.6.0 added functionality which is not related to this issue and I closed this issue by accident.

The proper solution to the current issue can be that we introduce another boolean variable named recreate_asg_when_lc_changes. If it is set to true then random_pet resource will be used to append to ASG name_prefix.

I will make a PR for this now.

@antonbabenko
Copy link
Member

v2.7.0 has been released.

Please test it and report if there is something missing. It is a backward-compatible release, so you should add recreate_asg_when_lc_changes = true in arguments to the module to get it to work.

@github-actions
Copy link

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 Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants