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

feat: Tags passed into worker groups override tags from var.tags for Autoscaling groups #1092

Merged
merged 7 commits into from
Nov 7, 2020

Conversation

huddy
Copy link
Contributor

@huddy huddy commented Nov 6, 2020

PR o'clock

Description

This PR brings an enhancement that allows tags that are passed into var.worker_groups_launch_template or var.worker_groups to override tags passed in via var.tags for ASGs only.

This relates to #1091

The main use case for this is where a tag is required everywhere apart from worker nodes. In this case we can pass the tag in via var.tags, but then pass it in with the worker template and set propagate_at_launch to false.

In order to ensure that the override only happens where it needs to I had to move the asg_tags for expression from locals.tf to be in the context of each worker template.

This way we don't incorrectly override tags where we haven't actually overwritten them.

I wasn't sure if you would class this as an improvement or feature, but I went with improvement, happy to change it to a "feature".

Checklist

@huddy huddy marked this pull request as ready for review November 7, 2020 00:11
workers.tf Outdated Show resolved Hide resolved
@huddy
Copy link
Contributor Author

huddy commented Nov 7, 2020

I've just merged latest master too

@barryib barryib changed the title improvement: Override Tags for ASG when tag is passed in via worker launch template or config. feat: Tags passed into worker groups override tags from var.tags for Autoscaling groups Nov 7, 2020
@barryib barryib merged commit bba7c15 into terraform-aws-modules:master Nov 7, 2020
@barryib
Copy link
Member

barryib commented Nov 7, 2020

Thanks @huddy for your contribution. I'll make a new release as soon as fargate PR is merged.

@barryib barryib added this to the v13.2.0 milestone Nov 7, 2020
@huddy
Copy link
Contributor Author

huddy commented Nov 9, 2020

Thanks for the very quick turnaround @barryib and once again thanks to you and other maintainers for awesome work.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 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

Successfully merging this pull request may close these issues.

2 participants