Observability as code: automate observability workflows and manage dashboards as code in Grafana
Over the past few years, many as code tools have emerged from Grafana Labs and the community that enable users to manage dashboards and other resources programmatically.
Admittedly, while we have shared some best practices for using Grafana as code, we haven’t been able to deliver clear recommendations with tools that are directly integrated into Grafana and supported by Grafana Labs.
With the Grafana 12 release, we’re changing all that. We’re introducing a suite of observability as code features and tools designed to streamline how you manage Grafana resources programmatically. For this major release, which we debuted during GrafanaCON 2025, our primary focus has been delivering a first-class experience for managing dashboards as code, laying the groundwork for managing much more in the future.
We’ve heard the community loud and clear about how important a robust as code experience is for managing Grafana at scale. That’s why this Grafana 12 release isn’t just about adding features; we’re also rebuilding core components of Grafana to deliver the consistency and reliability you need for your critical workflows.
Let’s dive into what’s new.
Back to basics: App Platform with consistent, versioned APIs
Experimental in Grafana OSS, Grafana Cloud, and Grafana Enterprise
With Grafana 12, we are rethinking our APIs. This means, we are introducing consistent, versioned, resource-oriented APIs for managing things like dashboards and folders.
Under the hood, Grafana is adopting a Kubernetes-inspired architecture, and using Kubernetes API patterns for consistency and robustness. While we leverage the Kubernetes style, we made this invisible to users who don’t want to interact with our APIs. Grafana continues to run as it always has, using your configured database. The new platform simply provides a stable, predictable base for all our observability as code tooling.
To learn more about the new API structure, check out our dashboard API documentation.
In Grafana 12:
- New resource APIs (
/apis/...
) are available for dashboards and folders, running alongside the existing legacy APIs (/api/...
) - The new APIs are released as
v1beta1
.
In the future:
- We will move dashboards and folders APIs to a stable version.
- We will migrate all core Grafana resources (e.g., data sources configs and alerting rules) to the new API structure.
- We will go through the formal deprecation process for corresponding legacy API endpoints over the next year, giving users enough time to update and migrate.
A new dashboard schema (v2)
Experimental in Grafana OSS, Grafana Cloud, and Grafana Enterprise
The traditional dashboard JSON model mixes everything—layout, panel definitions, queries. We’re introducing a new schema version (v2) built on our new API foundation. It decouples layout from panel configuration (elements
), making the JSON structure cleaner, easier to read in Git diffs, and enabling powerful new features like
dynamic dashboards.
To learn more, check out our dashboard schema documentation.
In Grafana 12:
- The new dashboard schema is accessible via the
v2alpha1
Dashboard API endpoint, running alongside the newv1beta1
API and the traditional legacy API endpoints. - The v2 schema enables new layout possibilities and forms the basis for upcoming dynamic dashboard features.
In the future:
- We will stabilize the v2 schema, moving it first towards public preview and then general availability status.
- We will explore tooling and create migration paths to help users adopt the new schema for existing dashboards.
- We will build more features leveraging the flexibility of schema v2.
Git Sync: Version control dashboards from the Grafana UI
Experimental in Grafana OSS and Grafana Enterprise. Private preview for a limited number of Grafana Cloud users.
Git Sync brings a Git workflow directly into the Grafana UI. You can connect Grafana dashboards and folders (or your entire instance) to a GitHub repository, allowing you to save dashboard changes, create branches, and open pull requests without leaving Grafana. It’s the easiest way to start version controlling your dashboards.
Read more in our Git Sync deep dive blog post.

In Grafana 12:
- Git Sync is available as an experimental feature in Grafana OSS and Enterprise and available for a limited number of Grafana Cloud users as a private preview.
- It supports connecting to GitHub repositories for bi-directional synchronization using the new resource APIs.
- Save dashboards directly to
main
or create new branches and PRs from the Grafana save modal. - Optional integrations provide instant updates via webhooks and dashboard image previews in PRs.
In the future:
- We will add support for plain Git and other hosted Git providers.
- We will expand support for other App Platform resources (e.g., data sources configs, alerting rules, and more).
Foundation SDK: Define dashboards in code
Public Preview in Grafana OSS, Grafana Cloud, and Grafana Enterprise
The Grafana foundation SDK provides libraries for defining Grafana resources, such as dashboards, programmatically using popular programming languages, like Go or Java. Instead of crafting JSON by hand, you can use strongly typed builders to create, validate, and manipulate resources within your existing development workflows and CI/CD pipelines.
To learn more, check out our foundation SDK documentation.
In Grafana 12:
- The SDK is available with support for Go, Java, PHP, Python, and TypeScript.
- The SDK supports dashboards and alert rules.
In the future:
- We will expand SDK support to cover more Grafana resources, including all those available via resource APIs.
- We will ensure the SDK stays tightly synchronized with Grafana releases and API versions.
Grafana CLI (grafanactl
)
Public preview in Grafana OSS, Grafana Cloud, and Grafana Enterprise
Many as code setups rely on custom scripts hitting Grafana APIs, especially in CI/CD. The new Grafana CLI called grafanactl
offers an official, streamlined alternative for both automation pipelines and local development that will greatly simplify the way you can work with Grafana as code and help get rid of custom tooling.
grafanactl
offers the flexibility and customization required for scenarios beyond the scope of Git Sync. With GrafanaCTL, you can manage your resources directly from the command line, syncing local definitions (e.g., pulled from Git or from another Grafana instance) with your Grafana instances. But it is much more than that: It also simplifies synchronization between multiple Grafana instances.
For more information, you can read our CLI documentation.
For Grafana 12:
- It allows you to get, pull, push, and validate resources managed via the new APIs.
- It integrates with the foundation SDK for enabling live and local-only previews of changes made to the resources using the serve command.
In the future:
- We will iterate on the UX of the CLI based on users’ feedback.
- We will explore adding new capabilities, such as linting.
- Resources powered by the new APIs will automatically be available in the CLI.
New Terraform resource
Public preview in Grafana OSS, Grafana Cloud, and Grafana Enterprise
Manually adding resources to Grafana’s Terraform provider over time led to inconsistencies. We’re addressing this by building new resources directly on our App Platform APIs. This foundational approach means future resources can be generated automatically, ensuring they all look and behave consistently. The first resource built this way, for dashboards, arrives in Grafana 12.
In Grafana 12:
- New Terraform resources for dashboards (
grafana_apps_dashboard_dashboard_v1beta1
) and playlists (grafana_apps_playlist_playlist_v0alpha1
) are introduced, built on top of the new APIs with support for schema-based validation.
In the future:
- We will work on automation that adds new Terraform resources for new resource APIs as soon as they become available.
- We will improve the handling of resources provisioned via Terraform in Grafana UI, to make it easier for you to distinguish between dashboards created manually and those created via Terraform. It will also help prevent accidental edits to resources managed by Terraform.
Try observability as code tools in Grafana 12 today
Explore the new observability as code features now available in Grafana! Before enabling them in your production environment, be sure to check the release stage of each feature. For features that are experimental and in active development—such as Git Sync and schema v2—we recommend that you do not use them in a production environment. Instead, you should try these features out in a development environment.
We’d love to hear what you think about your observability as code experience in Grafana—join our Grafana Labs Community Slack and share your feedback in the #observability-as-code channel!
To learn about all the latest and greatest feature in Grafana 12, check out the Grafana 12 release blog. And to see all the headlines from GrafanaCON, please read the GrafanaCON 2025 announcements blog.
Grafana Cloud is the easiest way to get started with metrics, logs, traces, dashboards, and more. We have a generous forever-free tier and plans for every use case. Sign up for free now!