Data Source: scalr_role

This data source is used to retrieve details of a single role.

Example Usage

# To retrieve a custom role, an account id and role id (or name) are required:

data "scalr_role" "example1" {
  id         = "role-xxxxxxxxxx"
  account_id = "acc-xxxxxxxxxx"

data "scalr_role" "example2" {
  name       = "WorkspaceAdmin"
  account_id = "acc-xxxxxxxxxx"

# To retrieve system-managed roles an account id has to be omitted:

data "scalr_role" "example3" {
  name = "user"



  • account_id (String) ID of the account.
  • id (String) ID of the role.
  • name (String) Name of the role.


  • description (String) Verbose description of the role.
  • is_system (Boolean) Boolean indicates if the role can be edited.
  • permissions (List of String) Array of permission names.