Slide 4 of 5

The Observability as Code tools landscape

Grafana’s Observability as Code tools

Grafana offers several as-code tools. Each solves a different part of the problem, and they can work together. This diagram shows how they relate in the generate-and-deploy workflow.

Diagram showing how Observability as Code tools connect: Foundation SDK generates dashboard JSON, which flows to gcx, Terraform, or Git Sync for deployment to Grafana

This journey doesn’t cover all the as Code tools available in Grafana, it only focuses on the Foundation SDK (generate) + Terraform (deploy) + GitHub Actions (automate) workflow.

Tool overview

This table has details on each tool, what it does, what to use it for, and whether it’s covered in this journey.

ToolWhat it doesUse it forPart of this journey?
Foundation SDKDefines dashboards in typed code (Go, TS, Python, Java, PHP)Generating dashboard JSON programmaticallyYes
Terraform providerManages dashboards, folders, data sources, and alerts with Terraform, alongside your infrastructureTeams already using Terraform for Infrastructure as CodeYes
Git SyncSyncs dashboard JSON in a GitHub repo with GrafanaTeams wanting Git-native workflows without custom pipelinesNo
gcxCommand-line tool that authenticates to Grafana and pushes or pulls resources from your local machineQuick deployments, CI/CD steps, scriptingNo

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.