---
updatedAt: 2026-03-01T17:56:24.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/terraform/llms.txt
---

# Role

akamai_iam_role

Create, update, or delete roles at the account level. Then use these roles to assign to users and grant them access to objects in a group. To delete a role, use `terraform destroy`.

```json Declaration: Basic
resource "akamai_iam_role" "my_role" {
  name        = "View Reports Only"
  description = "This role will allow you to view all reports."
  granted_roles = [
    123456,
    987654
  ]
}
```
```json Declaration: With dependencies
data "akamai_iam_grantable_roles" "my_grantable_roles" {
}

resource "akamai_iam_role" "my_role" {
  depends_on  = [data.akamai_iam_grantable_roles.my_grantable_roles]
  name        = "View Reports Only"
  description = "This role will allow you to view all reports."
  granted_roles = [
    data.akamai_iam_grantable_roles.my_grantable_roles.grantable_roles[0].granted_role_id,
    data.akamai_iam_grantable_roles.my_grantable_roles.grantable_roles[5].granted_role_id
  ]
}
```

## Arguments

| Argument        | Required | Description                                                                                                                                            |
| --------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`          |     ✔    | A name for your new role.                                                                                                                              |
| `description`   |     ✔    | A description of the role.                                                                                                                             |
| `granted_roles` |     ✔    | A set of granted role IDs for an account. To list all `granted_role_ids`, use the [`akamai_iam_grantable_roles`](https://techdocs.akamai.com/terraform/docs/iam-ds-grantable-roles) resource. |

## Attributes

There is no default standard output. Upon creation, the last line of the process log contains a success message.

Adding an output block returns the role details you provided on create along with the computed `type` attribute. This attribute indicates whether it's a standard role provided by Akamai or a custom role for the account.

# Sibling pages

* [API client](https://techdocs.akamai.com/terraform/docs/iam-rc-api-client.md)
* [Blocked user properties](https://techdocs.akamai.com/terraform/docs/iam-rc-blocked-user-properties.md)
* [CIDR block](https://techdocs.akamai.com/terraform/docs/iam-rc-cidr-block.md)
* [Group](https://techdocs.akamai.com/terraform/docs/iam-rc-group.md)
* [IP allowlist](https://techdocs.akamai.com/terraform/docs/iam-rc-ip-allowlist.md)
* [User](https://techdocs.akamai.com/terraform/docs/iam-rc-user.md)