Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Allow out-of-band tags for stackset to remain during updates#127

Open
ksamyak-aws wants to merge 5 commits intoaws-cloudformation:masterfrom
ksamyak-aws:master
Open

Allow out-of-band tags for stackset to remain during updates#127
ksamyak-aws wants to merge 5 commits intoaws-cloudformation:masterfrom
ksamyak-aws:master

Conversation

@ksamyak-aws
Copy link

Issue #, if available:

Description of changes:

Allows out of band tags to remain during update stack set when performed by the resource provider. This makes it so the tags on the stackset resource itself are not overridden.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ksamyak-aws ksamyak-aws requested a review from aradven August 18, 2025 23:54
Comment on lines 118 to 124
Set<Tag> allTags = new HashSet<>(currentTags);
Set<Tag> currentTagSet = translateToSdkTags(tags);
allTags.addAll(currentTagSet);
// Remove the one's that were in the previousTags but not in tags
Set<Tag> previousTagSet = translateToSdkTags(previousTags);
previousTagSet.removeAll(currentTagSet);
allTags.removeAll(previousTagSet);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little hard to follow, a lot of stuff being added/removed. Do we not just need to set the tags to targetTags + out of band tags? So something like:

outOfBandTags = currentTags - previousTags
tagsToSet = targetTags + outOfBandTags

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.

3 participants