Slide 2 of 2

Deploy a dashboard learning path

Learning path: Deploy a dashboard with Terraform

The following table describes the steps you’ll work through in the learning path.

StepWhat you’ll doOutcome
1. Create a service accountSet up API credentials in Grafana for TerraformA service account token for authentication
2. Configure the providerDeclare the Grafana Terraform provider and authenticateTerraform connected to your Grafana instance
3. Add a dashboard resourceDefine a grafana_dashboard resource pointing to your JSON fileA Terraform configuration ready to deploy
4. Run terraform planPreview what Terraform will create in GrafanaConfidence in what will change before applying
5. Apply and verifyRun terraform apply and confirm the dashboard appears in GrafanaA live dashboard deployed from code

Before you start

Have these ready before you open the path:

  • A Grafana Cloud account or self-managed Grafana instance (version 12 or higher)
  • Terraform installed (version 1.0 or later)
  • A dashboard JSON file (from the previous learning path or exported from the Grafana UI)
  • Admin or Editor permissions on your Grafana instance
Learning path

Deploy a dashboard with Terraform

Welcome to the learning path that shows you how to deploy SDK-generated dashboard JSON to Grafana using the Terraform provider.

14 min
Intermediate
Docs & blog posts

Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack, or in the Grafana Play stack, with an interactive learning experience.

Script

Time to put deployment into practice. The learning path walks you through every step: creating a service account for authentication, configuring the Grafana Terraform provider, defining a dashboard resource, running terraform plan, and applying the changes to deploy your dashboard.

Before you open the path, make sure you have Terraform installed and a Grafana instance ready. You’ll also need the dashboard JSON file you generated in the previous section.