Data Source: aws_iam_users#
Provides the lists of the ARNs (Amazon Resource Names) and names of selected IAM users.
Example Usage#
All Users#
data "aws_iam_users" "selected" {}
Users Filtered By Name Regex#
data "aws_iam_users" "selected" {
name_regex = "user.*"
}
Argument Reference#
The following arguments are supported:
name_regex
- (Optional) A regex string to apply to the list of users returned by IAM API.
~> Note This filtering is performed locally and can affect performance when the list of users is large.
Attribute Reference#
Supported attributes#
In addition to all arguments above, the following attributes are exported:
arns
- List of ARNs of the users.id
- The region.names
- List of user names.
Unsupported attributes#
~> Note This attribute may be present in the terraform.tfstate
file, but it has a preset value and cannot be specified in configuration files.
The following attribute is not currently supported: path_prefix
.