Configure Grafana Cloud using Terraform
Welcome to the Grafana learning journey that shows you how to configure Grafana Cloud components as code using Terraform. This journey demonstrates how to automate the setup of authentication, data sources, dashboards, alerts, and role-based access controls using infrastructure as code practices.
Terraform is an infrastructure as code tool that lets you define and provision infrastructure using declarative configuration files. With the Grafana Terraform provider, you can manage your entire Grafana Cloud configuration as code, enabling version control, reproducibility, and team collaboration.
This approach is valuable for organizations with DevOps and SRE cultures that require consistent, auditable infrastructure deployments. By treating your Grafana configuration as code, you can apply the same rigor to your observability platform as you do to your application infrastructure.
Here’s what to expect
When you complete this journey, you’ll be able to:
- Install and configure the Grafana Terraform provider
- Set up SAML authentication with external group sync
- Create data sources and configure access controls
- Build dashboard folders with team-specific permissions
- Configure alert rules, contact points, and notification policies
- Implement custom RBAC roles with granular permissions
- Apply label-based access controls to restrict data visibility
- Deploy configuration changes using Terraform
Before you begin
Before you configure Grafana Cloud using Terraform, ensure that you have:
- A Grafana Cloud account. To create an account, refer to Grafana Cloud.
- Terraform installed on your local machine (version 1.0 or later recommended).
- A Grafana Cloud service account with Admin permissions and an API token.
- An identity provider account (OKTA is used in this journey, but other SAML providers work similarly).
- Basic familiarity with Terraform syntax and infrastructure as code concepts.
- Experience with version control systems like Git for managing Terraform configurations.
Troubleshooting
If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.
More to explore
We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.
