The following code will provide you're AWS environment with users:
- user-1
- user-2
via tfvars. Both will have their credentials saved in AWS Secrets Manager. To achieve this, please take a look at the following code:
module "users" {
source = "[email protected]:terraform-cloud-aws-modules/iam-users.git"
users = var.users
}
variable "users" {
type = map
}
output "user_arns" {
value = module.users.user_arns
}
output "user_ids" {
value = module.users.user_ids
}
users = {
"user-1" = {
path = "/"
force_destroy = true
tag_email = "[email protected]"
}
"user-2" = {
path = "/"
force_destroy = true
tag_email = "[email protected]"
}
}