This data source can be used to fetch information about IAM access keys of a specific IAM user.
data "aws_iam_access_keys" "example" {
user = "an_example_user_name"
}
The following arguments are required:
user
- (Required) Name of the IAM user associated with the access keys.This data source exports the following attributes in addition to the arguments above:
access_keys
- List of the IAM access keys associated with the specified user. See below.The elements of the access_keys
are exported with the following attributes:
access_key_id
- Access key ID.create_date
- Date and time in RFC3339 format that the access key was created.status
- Access key status. Possible values are Active
and Inactive
.