fix(organizations): store the tags passed to CreateAccount (#7302)

CreateAccount validated Tags and then dropped them, so ListTagsForResource on a new account was empty and Terraform reported tag drift on every account it created. Store them like CreateOrganizationalUnit does.

Closes #7301
This commit is contained in:
Francisco Javier Barón authored and GitHub committed 2026-11-02 09:39:33 -04:00
1 parent 33e12b3cf7
commit c79db010ea
2 files changed
+14

No files matched your search

@@ -637,6 +637,9 @@ public class OrganizationsService implements ScpProvider, RootAccessOrganization
String newAccountId = allocateAccountId(organization);
OrganizationAccount account = newMemberAccount(organization, newAccountId, email, accountName, "CREATED");
if (tags != null) {
account.getTags().putAll(tags);
}
accounts.putForAccount(organization.getMasterAccountId(), newAccountId, account);
attachFullAwsAccess(organization, newAccountId);
accountAccessRoleProvisioner.provision(newAccountId,