---
title: "Terraform and Fleet Management | Grafana Cloud documentation"
description: "Learn how to use Terraform to provision collectors and pipelines in Grafana Fleet Management"
---

# 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](https://registry.terraform.io/providers/grafana/grafana/latest/docs).

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](https://www.terraform.io/) configuration creates a pipeline called `my_pipeline`:

terraform ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```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](/docs/grafana-cloud/developer-resources/infrastructure-as-code/terraform/terraform-fleet-management/).
