Provisioning with variable values

We deploy Grafana from a scripted infrastructure. (read “Ansible & Terraform”)

We have several single-node Grafana servers, each having a single dashboard. The dashboards differ only in that some names are different, e.g. server name, region, limits, etc. We have extracted the dashboard as a string, and parameterize the values. When we build an instance, we replace these values and INSERT the string into the sqlite3 database. Clunky, yes, but this approach works. But it does have us looking over our shoulder every time we upgrade Grafana, since we need to be ready for any schema changes that would impact the scripts.

I’m interested to know if we can deploy a single, identical dashboard to each of the servers and have the values of those “parameterized variables” read in separately. From what I understand, constant template variables will do this by prompting on import. But, again, we are a completely scripted infrastructure, so there is no point at which we could import a dashboard.

Enter Grafana Dashboard Provisioning. I’m aware of the dashboard provisioning doc ( which sounds very close , but don’t understand how to accomplish what I’m looking for with that regarding the variables.

So, I see disparate features, but am looking for someone that has solved this problem.

What I would love to do is build a dashboard, export the json, place it in the provisioning location, and then they are automatically deployed, and have the variable substituted as they are deployed.

Anyone with ideas?

Why you can’t use Terraform also for dashboard customization and provisioning?
There is Grafana provider, which you can use: