Initial password notification email

Hi,

I’m trying to set up AWS IAM Users and give out initial passwords for console access.

Is there any way that I can get an initial password and send a email thru Terraform?

Also will it reset the existing users’ passwords if I run new aws_iam_user_login_profile to create a password?

It’s not going to be easy…
you would have to create user profiles with https://www.terraform.io/docs/providers/aws/r/iam_user_login_profile.html

And then collect the output and use with the local-exec provisioner somehow https://www.terraform.io/docs/provisioners/local-exec.html

I’d recommend creating the users outside Terraform, and collecting them with the data resource https://www.terraform.io/docs/providers/aws/d/iam_user.html for defining groups