Grafana Cloud

Terraform and Fleet Management

Provision your collectors and configuration pipelines in Grafana Fleet Management using v3.19.0 or later of the Grafana Terraform provider.

You can preregister new collectors before they are operational, add remote attributes to collectors already registered with the service, and build configuration pipelines to export telemetry. For example, the following Terraform configuration creates a pipeline called my_pipeline:

terraform
resource "grafana_fleet_management_pipeline" "example" {
  name     = "my_pipeline"
  contents = file("config.alloy")
  matchers = [
    "env=\"PROD\""
  ]
  enabled = true
}

Configuration pipelines created with Terraform are identified as such in the Remote configuration tab, where a Source column helps you track the origin of pipelines synced from external sources. To prevent drift, these pipelines can’t be edited from the Fleet Management application.

Next steps

To get started, refer to the guide Manage Fleet Management in Grafana Cloud using Terraform.