Slide 4 of 5

The Infrastructure as Code tools landscape

Grafana’s as-code tools

Grafana offers several as-code tools. Each solves a different part of the problem, and they can work together. 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?
Terraform providerManages dashboards, folders, data sources, alert rules, contact points, notification policies, and more with TerraformTeams already using Terraform for Infrastructure as CodeYes
Git SyncSyncs resource files 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
Foundation SDKDefines dashboards in typed code (Go, TS, Python, Java, PHP)Generating dashboard JSON programmaticallyNo (dashboard-specific)

Script

Grafana offers several tools for managing resources as code. Each solves a different part of the problem, and they can work together.

The Grafana Terraform provider lets you manage dashboards, folders, data sources, alert rules, contact points, notification policies, and more. If you already use Terraform for infrastructure, this keeps your Grafana resources in the same workflow.

Git Sync connects a GitHub repository directly to your Grafana instance. You store resource 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.

The Foundation SDK is a set of code libraries for defining dashboards programmatically using Go, TypeScript, Python, Java, or PHP. It’s specific to dashboards, so it’s outside the scope of this journey.

This journey focuses on the Terraform provider for defining and deploying Grafana resources.