-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grafana Dashboard doesn't support folder_id and org_id #31
Comments
Digging around in the code today, it looks like someone added |
Also, there doesn't seem to be a way to associate a |
Hey guys, after a lot of digging around I figured out a way to add ORG_ID to all resources in Graphana, and hence associate them with a particular org. The root of the issue lies in how the Graphana API deals with Orgs. When you call the Graphana API to create/retrieve/update/delete a resource the API call is always associated with the "current org". No idea why they decided to do this but this totally breaks the "RESTful" standard of API calls being stateless and self contained. Here is the desired behavior, which I have been able to implement:
How this is possible:Deep, hidden in the Graphana issues page, you find an undocumented header that can be used to specify which org you would like to attach a particular resource to. The header: After modifying the client library, I was able to change the graphana provider and add an org_id field to all of the resources. So the above behaviour can now be accomplished. I would like to get this implemented into the main repo, but seeing as I also modified the client library, I would like some info on what the best approach is. Here is my modified graphana provider: https://github.com/emerald-squad/terraform-provider-grafana |
See pull request https://github.com/terraform-providers/terraform-provider-grafana/pull/60 which partially addresses this issue. |
|
Terraform Version
Terraform v0.11.2
Affected Resource(s)
Terraform Configuration Files
The code is working and the grafana dashboard will be created. But in wrong Grafana Organization and Folder because I'm not able to set following parameters:
I use a grafana version 5.2.1 (2040f61)
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: