You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resource (and data source) grafana_user is currently only supported for self hosted Grafana installation and doesn't work with cloud stack. The challenge being that calling the underlying api requires basic auth which isn't supported for cloud enterprise stack. With service account api token having Admin privileges, I get: You'll need additional permissions to perform this action. Permissions needed: users:read
Use Case:
Trying to provide RBAC at datasource level using grafana_data_source_permission requires referencing the user.id attribute. In our case, we need to lookup the user id in Grafana using users' email id
Doing similar RBAC for dashboard folders requires looking up user id
Solution/Feature request
The api that grafana_user uses the api /api/users/lookup?loginOrEmail=example@email.com which restricts access to basic auth.
Proposal is to create another terraform resource (and data source) which uses the api /api/org/users?query=example@email.com. The resource can be named grafana_user_org or grafana_user_cloud.
Workaround:
We have used terraform http as a workaround that calls the api mentioned in proposal section. The api looks up user accepting email id and yields user id as response to be further consumed for providing RBAC to datasource.
Please let me know if this feature request is an acceptable addition to enhancing Grafana terraform. If yes, I'd like to contribute to the repository.
The text was updated successfully, but these errors were encountered:
Feature Request
The resource (and data source) grafana_user is currently only supported for self hosted Grafana installation and doesn't work with cloud stack. The challenge being that calling the underlying api requires basic auth which isn't supported for cloud enterprise stack. With service account api token having Admin privileges, I get:
You'll need additional permissions to perform this action. Permissions needed: users:read
Use Case:
user.id
attribute. In our case, we need to lookup the user id in Grafana using users' email idSolution/Feature request
The api that
grafana_user
uses the api/api/users/lookup?loginOrEmail=example@email.com
which restricts access to basic auth.Proposal is to create another terraform resource (and data source) which uses the api
/api/org/users?query=example@email.com
. The resource can be namedgrafana_user_org
orgrafana_user_cloud
.Workaround:
We have used terraform http as a workaround that calls the api mentioned in proposal section. The api looks up user accepting email id and yields user id as response to be further consumed for providing RBAC to datasource.
Please let me know if this feature request is an acceptable addition to enhancing Grafana terraform. If yes, I'd like to contribute to the repository.
The text was updated successfully, but these errors were encountered: