Deploy your dashboards

Now it’s time to connect your code-generated dashboards to a running Grafana instance.

Deployment methods available in Grafana

Grafana supports several ways to deploy dashboards from code. The right choice depends on the workflow your team already uses. Each has different trade-offs.

MethodHow it worksBest forTrade-off
TerraformDefine dashboards in HCL files and deploy them with the same plan-and-apply workflow as your other infrastructureTeams with existing Terraform workflowsAnother tool to learn if you don’t already use it
Git SyncStore dashboard JSON in a GitHub repository; Grafana automatically synchronizes itGit-native teams, no custom pipelinesLess control over the deployment process
Grafana APISend HTTP requests to Grafana directly; the other two methods are built on top of itFull custom controlMore code to write and maintain

This journey covers Terraform deployments. You’ll produce as-code workflows that integrate with your existing infrastructure code.

Script

You have several ways to get dashboard JSON into Grafana. The right choice depends on your existing workflow.

The Terraform provider fits teams that already manage infrastructure with Terraform. Your dashboards live alongside your other resources in HCL files, and deploy through the same plan-and-apply workflow you already use.

Git Sync takes a different approach. You store dashboard JSON files in a GitHub repository, and Grafana automatically synchronizes them. No pipeline code needed, but less control over the deployment process.

The Grafana API gives you full control but requires handling HTTP requests yourself. The other tools are built on top of it.

This journey focuses on the Terraform provider for deploying SDK-generated dashboard JSON.