Can't provision Grafana dashboard with default permissions

285 views Asked by At

I'm facing some problems when I'm trying to provision open source grafana dashboards running on docker container.

Dashboards are visible and working correctly, but for some reason they only have permission for Admin role.

When I create dashboard manually it has default permissions for Admin, Editor and Viewer, and that what's I need to have from start.

I need to somehow provision those permissions in dockerfile or config, because everything is created as a code.

I was looking in docs, but there is only RBAC provisioning for Grafana Enterprise.

On k8s we use Grafana-operator and it works perfectly there, but here I need some way to get in done in docker container.

2

There are 2 answers

0
VapeBoro On BEST ANSWER

The problem was connected with Grafana v10.2 which removed root folder. After downgrade to 9.5, provisioned folders are created with default permissions.

0
hassanzadeh.sd On

this solved my same issue, change your container to root access: in compose file add this line :

...
services:
    grafana:
        build: .
        user: root
        ports:
            - "3000:3000"
        depends_on:
            - prometheus
...

and run again, remove your dashboards, and change this access to normal user.