Skip to content

Commit

Permalink
Updating OrganizationalUnit create and update handlers to support sta…
Browse files Browse the repository at this point in the history
…ck tags
  • Loading branch information
pns-amzn committed Dec 24, 2024
1 parent 3afc427 commit 53a9133
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package software.amazon.organizations.organizationalunit;

import java.time.Duration;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import software.amazon.awssdk.services.organizations.OrganizationsClient;
Expand Down Expand Up @@ -89,12 +87,12 @@ public void handleRequest_SimpleSuccess() {

final Set<Tag> oldTags = TagsHelper.mergeTags(
TagsHelper.convertOrganizationalUnitTagToOrganizationTag(previousResourceModel.getTags()),
TagTestResourcesHelper.defaultStackTags
request.getPreviousResourceTags()
);

final Set<Tag> newTags = TagsHelper.mergeTags(
TagsHelper.convertOrganizationalUnitTagToOrganizationTag(model.getTags()),
TagTestResourcesHelper.updatedStackTags
request.getDesiredResourceTags()
);

final Set<Tag> tagsToAddOrUpdate = TagsHelper.getTagsToAddOrUpdate(oldTags, newTags);
Expand Down

0 comments on commit 53a9133

Please sign in to comment.