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) Friendly IAM user name to match.This data source exports the following attributes in addition to the arguments above:
arn
- ARN assigned by AWS for this user.id
- Unique ID assigned by AWS for this user.path
- Path in which this user was created.permissions_boundary
- The ARN of the policy that is used to set the permissions boundary for the user.user_id
- Unique ID assigned by AWS for this user.user_name
- Name associated to this Usertags
- Map of key-value pairs associated with the user.