improvement: Tags passed into worker groups should also be excluded from Launch Template tag specification#1095
Merged
Merged
Conversation
…oups or worker_groups_launch_template so that propagate_at_launch can be tweeked for a particular key.
barryib
suggested changes
Nov 11, 2020
| var.tags, | ||
| { for tag_key, tag_value in var.tags : | ||
| tag_key => tag_value | ||
| if ! contains([for tag in lookup(var.worker_groups_launch_template[count.index], "tags", local.workers_group_defaults["tags"]) : tag["key"]], tag_key) |
Member
There was a problem hiding this comment.
Can you please exclude the tag Name also, like you already did for ASG ? It's more about consistency.
Contributor
Author
There was a problem hiding this comment.
Thanks for the review, Yep, I've added this now :)
barryib
approved these changes
Nov 12, 2020
Member
|
v13.2.1 is now released |
4 tasks
2 tasks
1 task
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR o'clock
Description
I recently raised #1092 which allows us to overide tags on the asg and set
propagate_at_launchtofalseto prevent instances from getting the tag.This works well for launch configuration, but for launch templates we also currently pass in
tag_specificationfor instances which then negates the point of #1092This PR therefore adds a feature to exclude any tags on the tag specification for instances on the launch templates, that are passed in via worker groups config.
This means we can control if a tag makes it to instance from the ASG or not without the tag specification interfering and the ASG tags become the source of truth for propagation only if they are passed in with worker groups.
Checklist