For_each aws account creation

Hi,

Im looking for a solution which utilizes aws organizations to create a new aws account, then use the new account id dynamically in a provider arn, so I can assume OrganizationAccountAccessRole in the newly created account and create resources needed in the new account.
Im looking to do this using for_each to make it easy to scale new accounts.

Anyone has any suggestions how to achieve this?

Cheers,
Chris