2017-03-30 18:09:11 +02:00
|
|
|
---
|
|
|
|
layout: "aws"
|
2017-04-07 17:44:35 +02:00
|
|
|
page_title: AWS: aws_iam_role
|
|
|
|
sidebar_current: docs-aws-datasource-iam-role
|
2017-03-30 18:09:11 +02:00
|
|
|
description: |-
|
|
|
|
Get information on a Amazon IAM role
|
|
|
|
---
|
|
|
|
|
2017-04-07 17:44:35 +02:00
|
|
|
# aws_iam_role
|
2017-03-30 18:09:11 +02:00
|
|
|
|
|
|
|
This data source can be used to fetch information about a specific
|
|
|
|
IAM role. By using this data source, you can reference IAM role
|
|
|
|
properties without having to hard code ARNs as input.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-07 17:54:28 +02:00
|
|
|
```hcl
|
2017-03-30 18:09:11 +02:00
|
|
|
data "aws_iam_role" "example" {
|
|
|
|
role_name = "an_example_role_name"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
* `role_name` - (Required) The friendly IAM role name to match.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
* `arn` - The Amazon Resource Name (ARN) specifying the role.
|
|
|
|
|
|
|
|
* `assume_role_policy_document` - The policy document associated with the role.
|
|
|
|
|
|
|
|
* `path` - The path to the role.
|
|
|
|
|
|
|
|
* `role_id` - The stable and unique string identifying the role.
|