Read script
Script
Grafana offers several tools for managing resources as code. Each solves a different part of the problem, and they can work together.
The Foundation SDK is a set of code libraries that let you define dashboards using a programming language: Go, TypeScript, Python, Java, or PHP. You write typed code, the SDK produces dashboard JSON. It handles the “generate” step.
The Grafana Terraform provider lets you manage dashboards, folders, data sources, and alerts. If you already use Terraform for infrastructure, this keeps your dashboards in the same workflow.
Git Sync connects a GitHub repository directly to your Grafana instance. You store dashboard JSON files in a repo, and Git Sync keeps them synchronized with Grafana. Great for teams that want a Git-native workflow without writing pipeline code.
gcx is Grafana’s command-line tool. It authenticates to your Grafana instance and pushes or pulls resources. Think of it as the bridge between your local machine and Grafana’s API.
This journey focuses on the Foundation SDK for generating dashboards and the Terraform provider for deploying them.