Provisioning RBAC with Grafana
Note
Available in Grafana Enterprise and Grafana Cloud.
You can create, change or remove Custom roles and create or remove basic role assignments, by adding one or more YAML configuration files in the provisioning/access-control/
directory.
Grafana performs provisioning during startup. After you make a change to the configuration file, you can reload it during runtime. You do not need to restart the Grafana server for your changes to take effect.
Before you begin:
- Ensure that you have access to files on the server where Grafana is running.
To manage and assign RBAC roles using provisioning:
Sign in to the Grafana server.
Locate the Grafana provisioning folder.
Create a new YAML in the following folder: provisioning/access-control. For example,
provisioning/access-control/custom-roles.yml
Add RBAC provisioning details to the configuration file.
Refer to Manage RBAC roles and Assign RBAC roles for instructions.
Refer to example role provisioning file for a complete example of a provisioning file.
Reload the provisioning configuration file.
For more information about reloading the provisioning configuration at runtime, refer to Reload provisioning configurations.
Example role configuration file using Grafana provisioning
The following example shows a complete YAML configuration file that:
- Create custom roles
- Delete custom roles
- Update basic roles permissions
- Assign roles to teams
- Revoke assignments of roles to teams