terraform-provider-grafana
terraform-provider-grafana copied to clipboard
grafana_dashboard metadata being lost
Hi there,
Terraform Version
Terraform v0.11.7
- provider.grafana v1.0.2
Affected Resource(s)
Please list the resources as a list, for example:
- grafana_dashboard
Expected Behavior
Grafana dashboards use the metadata of the dashboard to reproduce placement in folders, etc.
This is all of the data for a dashboard given by the Grafana API. Note that the ~Grafana UI does not yet allow exporting the metadata.~ Grafana maintainers do not intend on allowing users to export the dashboard metadata through the UI. The proper method to get all of the dashboard data is through the API.
{ "meta": { "type": "db", "canSave": true, "canEdit": true, "canAdmin": false, "canStar": true, "slug": "dashboard-name", "url": "/d/XckjVRNik/dashboard-name", "expires": "0001-01-01T00:00:00Z", "created": "2018-06-13T20:50:54Z", "updated": "2018-06-13T21:19:15Z", "updatedBy": "bljordan", "createdBy": "Anonymous", "version": 2, "hasAcl": false, "isFolder": false, "folderId": 82, "folderTitle": "dashboard-name", "folderUrl": "/dashboards/f/kdhl-0Sik/dashboard-name" }, "dashboard": { "annotations": { "list": [ { <snip>
Actual Behavior
The terraform provider expects only the dashboard json blob and metadata is lost (folder placement, folder permissioning).
Steps to Reproduce
Use the terraform provider with Grafana 5.0.4 and folders. Make changes, apply, watch metadata be lost.
References
See corresponding issue in Grafana: https://github.com/grafana/grafana/issues/12266