This data source uses Grafana's admin APIs for reading users which does not currently work with API Tokens. You must use basic auth.
resource "grafana_user" "test" {
email = "test.datasource@example.com"
name = "Testing Datasource"
login = "test-datasource"
password = "my-password"
is_admin = true
}
data "grafana_user" "from_id" {
user_id = grafana_user.test.user_id
}
data "grafana_user" "from_email" {
email = grafana_user.test.email
}
data "grafana_user" "from_login" {
login = grafana_user.test.login
}
email
(String) The email address of the Grafana user. Defaults to ``.login
(String) The username for the Grafana user. Defaults to ``.user_id
(Number) The numerical ID of the Grafana user. Defaults to -1
.id
(String) The ID of this resource.is_admin
(Boolean) Whether the user is an admin.name
(String) The display name for the Grafana user.