mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
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:
1 parent
33e12b3cf7
commit
c79db010ea
2 files changed
+14
No files matched your search
+11
@@ -80,6 +80,17 @@ class OrganizationsServiceTest {
|
||||
assertTrue(status.getAccountId().matches("\\d{12}"), status.getAccountId());
|
||||
}
|
||||
|
||||
@Test
|
||||
void createAccountStoresTheRequestedTags() {
|
||||
service.createOrganization(MANAGEMENT_ACCOUNT, "ALL");
|
||||
|
||||
CreateAccountStatus status = service.createAccount(MANAGEMENT_ACCOUNT, "tagged@example.com", "Tagged",
|
||||
Map.of("team", "platform"), false);
|
||||
|
||||
assertEquals(Map.of("team", "platform"),
|
||||
service.listTagsForResource(MANAGEMENT_ACCOUNT, status.getAccountId()));
|
||||
}
|
||||
|
||||
/** The (member account, role name, management account) triples a provisioner received. */
|
||||
private static final class RecordedProvisions implements AccountAccessRoleProvisioner {
|
||||
final List<String> calls = new ArrayList<>();
|
||||
|
||||
Reference in new issue
Block a user