-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix: Add instance tag specification to launch template #762
Conversation
Tags are being applied after instances are launched whils in pending state. Adding a tag_specification for instance resources allows ensures that instances are tagged during launch. Fixes: #753
TBH I don't really understand the changes in this PR as I don't have experience here. @barryib do you know how |
@max-rocket-internet I don't use it either, but the use case sounds legit to me. Maybe @dpiddockcmp ? From what I understood in https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html, it's add tags to EC2 instances during their creation. |
yeah, I think so! Thanks for checking this! Use case is that with spot instances ASG will add tags to instances after those are created
Problem with this is that if you have policy, which denies you to launch instance without proper tagging - there is no way currently with this module to do that. And error message from API is very cryptic. See issue. That took me some time to solve that :) This could be solved with adding that I'm not sure though how these tags for instances defined in launch template will work with tags defined on ASG itself. Would be there any conflicts/overwrites if both defines the same tag? |
True. I'm not sure. As there would be a lot of overlap. @js-timbirkett do you know? Are they just merged? |
@js-timbirkett can you confirm please and remove your changes from changelog. It's now auto generated during the release process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@js-timbirkett are you still working on this ? There are some questions to answer before we get this PR merged.
@@ -9,6 +9,7 @@ project adheres to [Semantic Versioning](http://semver.org/). | |||
|
|||
## [[v9.?.?](https://github.com/terraform-aws-modules/terraform-aws-eks/compare/v9.0.0...HEAD)] - 2020-xx-xx] | |||
|
|||
- Fix #753 by adding and instance tag spec to launch templates (by @js-timbirkett) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please your changes in changelog ? It's now generated from git commits during release.
@max-rocket-internet Yep. They just merged. And tags from ASG have a higher priority then tags from LT if they match on tag key (I tested today) |
Great closing this in favor of #822 |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
PR o'clock
Description
Tags are being applied after instances are launched whils in pending state.
Adding a tag_specification for instance resources allows ensures that
instances are tagged during launch.
Fixes: #753
Checklist