Hello all,
I have a use case where I want to create a resource (module) in each of my AWS accounts and ideally, I don’t want to repeat the module definition all over again for each account (is identical, just the provider is different). This is not a use case for workspaces, because I don’t want to create the resources one at a time for each account.
Here is roughly what I’m after:
module “iam_role_content” {
source = “…/…/iam_role_with_policy”
for_each = [“west”, “central”]…
providers = {
aws = “aws.${each.key}”
}
}
Any idea how to do this (or a different approach)?
Thanks a lot!