grafana / terraform-provider-grafana

Terraform Grafana provider
https://www.terraform.io/docs/providers/grafana/
Mozilla Public License 2.0
413 stars 218 forks source link

Add support for adding dashboards to Grafana Cloud #1009

Open JorTurFer opened 10 months ago

JorTurFer commented 10 months ago

Hi, We are introducing automations in KEDA for the performance testing infrastructure and the dashboards to share the results are one of the things to automatize (we want to share them publicly, so we have to prepare dashboards and IaC seems like the good approach). OSS provider has support for importing dashboards using terraform, but Grafana Cloud doesn't support it.

JorTurFer commented 5 months ago

Hello, any update ?

julienduchesne commented 5 months ago

What do you mean about cloud dashboards? Do you mean uploading a dashboard to your cloud org (https://grafana.com/orgs/<org>/dashboards)

JorTurFer commented 5 months ago

Yeah, I'd like to provision grafana could dashboards using terraform. Currently grafana OSS supports it but not Grafana Cloud

julienduchesne commented 5 months ago

The fact that you're mentioning Grafana OSS is what has me confused. A dashboard in Grafana OSS is a dashbord on your Grafana instance. A dashboard on Grafana Cloud is just so you can publish a dashboard to https://grafana.com/grafana/dashboards/. It's not a dashboard you can view on your instance/stack

Do we mean the same thing? Just making sure we're on the same page

You can already create dashboards on your Grafana Cloud instance, here's an example: https://registry.terraform.io/providers/grafana/grafana/latest/docs#creating-a-grafana-cloud-stack-provider

JorTurFer commented 5 months ago

No no, I'd like to create dashboards on my Grafana Cloud stack using terraform in order to manage them using IaC. Let me explain the use case: We are an OSS project and we manage all the infra that we can (almost all indeed) using terraform from this repo. If a contributor wants to contribute with a dashboard for performance test results, they have to send us the json because otherwise, they'd need to have access to Grafana Cloud (and they could be random contributors). If the terraform provider supports managing dashboards, we could support this scenario.

This could apply also for migration cases from OSS to cloud. If I have the dashboards on my OSS instance managed by terraform and I want to migrate to cloud, I have to export/import them instead of just modifying the terraform