---
title: "Resources as code in Grafana | Grafana Labs"
description: "What it means to manage Grafana resources as code and how Terraform fits in"
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

## What “resources as code” means

When you manage Grafana resources as code, you define them in configuration files instead of configuring them through the UI. Those files live in version control, go through code review, and deploy through a pipeline.

| Manual (UI)                                 | As code (Terraform)                                    |
|---------------------------------------------|--------------------------------------------------------|
| Click through forms to create an alert rule | Write an HCL block that defines the rule               |
| Changes aren’t tracked                      | Every change is a Git commit                           |
| Hard to replicate across environments       | Same code deploys to staging and production            |
| No review process                           | Pull requests catch mistakes before they reach Grafana |

## What resources can you manage?

Grafana isn’t just dashboards. You can manage a wide range of resources across the entire Grafana ecosystem as code.

| Category           | Examples                                                                                  |
|--------------------|-------------------------------------------------------------------------------------------|
| **Visualization**  | Dashboards, folders, library panels, playlists                                            |
| **Alerting**       | Alert rule groups, contact points, notification policies, mute timings, message templates |
| **Data**           | Data sources, data source permissions                                                     |
| **Access control** | Service accounts, teams, users, roles, RBAC                                               |
| **Platform**       | Organizations, SLOs, plugins, annotations                                                 |
| **Grafana Cloud**  | Cloud stacks, access policies, Fleet Management, IRM/OnCall                               |
