VapeBoro
VapeBoro

Reputation: 13

Can't provision Grafana dashboard with default permissions

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.

Upvotes: 0

Views: 1081

Answers (2)

hassanzadeh.sd
hassanzadeh.sd

Reputation: 3461

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.

Upvotes: 0

VapeBoro
VapeBoro

Reputation: 13

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

Upvotes: 0

Related Questions