terraform-provider-grafana
terraform-provider-grafana copied to clipboard
datasource "grafana_user" not working, return 403, with Grafana Enterprise
Terraform Version
- Terraform: v1.2.5
- Terraform Grafana Provider: v1.24.0
- Grafana: v9.0.4 (Enterprise with SSO)
Affected Resource(s)
Please list the resources as a list, for example:
- datasource
grafana_users
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
data "grafana_user" "this" {
for_each = { for user in var.users: user => 0 }
email = each.key
}
provider "grafana" {
url = grafana.url
auth = grafana.auth # (Generated in grafana.net instead of grafana.com)
# Though also tried with cloud_api_key and username:password for auth
# Using Admin Service Account but still got 403.
}
Debug Output
https://gist.github.com/anhdle14/01da74e453e18b2c740a0d593ce54eb6
Panic Output
N/A
Expected Behavior
Should return users in datasources
Actual Behavior
Got 403
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Running on Enterprise license with SSO in sync for users.
References
N/A