RunR v0.5.7

Documentation

runr_role (Resource)

A custom role of the organization (role-based access control). Give it to members (runr members set-role), groups (runr_group.role) or on single projects (runr_project_access). Built-in roles (owner, admin, developer, viewer) are part of RunR and cannot be managed. Needs roles.manage; nobody can create a role with permissions they do not hold themselves.

Example Usage#

# A custom role: deploy and read logs and metrics, nothing else.
resource "runr_role" "release_manager" {
  name        = "Release manager"
  description = "Deploys releases and watches them"
  permissions = ["projects.deploy", "logs.view", "metrics.view"]
}

# effective_permissions lists them with the ones they imply (projects.view).
output "release_manager_permissions" {
  value = runr_role.release_manager.effective_permissions
}

Schema#

Required#

  • name (String) Display name.
  • permissions (Set of String) Permissions of the role (runr roles permissions lists the catalog). The permissions they imply are added by RunR and listed in effective_permissions.

Optional#

  • description (String) Description.
  • key (String) Role key (letters, digits, -, _). Default: the slug of name. Changing it replaces the role.

Read-Only#

  • effective_permissions (Set of String) permissions with every permission they imply (env.edit brings env.view).
  • id (String) The role key.

Import#

Import is supported using the following syntax:

The terraform import command can be used, for example:

# <role key> (custom roles only; `runr roles ls` lists the keys)
terraform import runr_role.release_manager release-manager

RunR v0.5.7 · MIT License