Install the Grafana Terraform provider
The Grafana Terraform provider enables you to manage Grafana Cloud resources using Terraform configuration files. Installing and configuring this provider is your first step toward managing your observability platform as code.
To install the Grafana Terraform provider, complete the following steps:
Create a new directory for your Terraform configuration:
mkdir grafana-terraform cd grafana-terraformCreate a file named
provider.tfwith the following content:terraform { required_providers { grafana = { source = "grafana/grafana" version = "~> 3.0" } } } provider "grafana" { url = "https://<YOUR_STACK>.grafana.net" auth = "<YOUR_SERVICE_ACCOUNT_TOKEN>" }Replace
<YOUR_STACK>with your Grafana Cloud stack name.Replace
<YOUR_SERVICE_ACCOUNT_TOKEN>with your service account token that starts withglsa_.Initialize Terraform to download the provider:
terraform init
The output confirms Terraform has downloaded and initialized the Grafana provider successfully.
In the next milestone, you’ll configure SAML authentication with external group synchronization.
