Note: This resource is available only with Grafana Enterprise 8.+.
resource "grafana_role" "super_user" {
name = "Super User"
description = "My Super User description"
uid = "superuseruid"
version = 1
global = true
permissions {
action = "org.users:add"
scope = "users:*"
}
permissions {
action = "org.users:write"
scope = "users:*"
}
permissions {
action = "org.users:read"
scope = "users:*"
}
}
name
(String) Name of the roleauto_increment_version
(Boolean) Whether the role version should be incremented automatically on updates (and set to 1 on creation). This field or version
should be set.description
(String) Description of the role.display_name
(String) Display name of the role. Available with Grafana 8.5+.global
(Boolean) Boolean to state whether the role is available across all organizations or not. Defaults to false
.group
(String) Group of the role. Available with Grafana 8.5+.hidden
(Boolean) Boolean to state whether the role should be visible in the Grafana UI or not. Available with Grafana 8.5+. Defaults to false
.org_id
(String) The Organization ID. If not set, the Org ID defined in the provider block will be used.permissions
(Block Set) Specific set of actions granted by the role. (see below for nested schema)uid
(String) Unique identifier of the role. Used for assignments.version
(Number) Version of the role. A role is updated only on version increase. This field or auto_increment_version
should be set.id
(String) The ID of this resource.permissions
Required:
action
(String) Specific action users granted with the role will be allowed to perform (for example: users:read
)Optional:
scope
(String) Scope to restrict the action to a set of resources (for example: users:*
or roles:customrole1
) Defaults to ``.Import is supported using the following syntax:
terraform import grafana_role.name "{{ uid }}"
terraform import grafana_role.name "{{ orgID }}:{{ uid }}"