This data source can be used to fetch information about a specific IAM user. By using this data source, you can reference IAM user properties without having to hard code ARNs or unique IDs as input.
data "aws_iam_user" "example" {
user_name = "an_example_user_name"
}
user_name - (Required) The friendly IAM user name to match. arn - The Amazon Resource Name (ARN) assigned by AWS for this user.
path - Path in which this user was created.
user_id - The unique ID assigned by AWS for this user.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/d/iam_user.html