---
title: Export and Import a Pipeline Configuration
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Observability Pipelines > Configuration > Export and Import a Pipeline
  Configuration
---

# Export and Import a Pipeline Configuration

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ().
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Setting up and updating a pipeline with Terraform or the API can be time-consuming, manual, and prone to syntax errors. Instead, you can create a pipeline or update an existing pipeline in the UI, and then export the configuration to JSON or Terraform to programmatically create or update the pipeline. Additionally, you can import a pipeline's configuration in JSON to the UI.

## Export the configuration of a pipeline in draft mode{% #export-the-configuration-of-a-pipeline-in-draft-mode %}

When building a pipeline that has not been deployed yet, you can set up the pipeline in the UI, and then export the pipeline configuration to JSON or Terraform to programmatically create it.

1. Navigate to [Observability Pipelines](https://app.datadoghq.com/observability-pipelines/).
1. [Set up a pipeline](https://docs.datadoghq.com/observability_pipelines/configuration/set_up_pipelines.md?tab=logs#set-up-a-pipeline-in-the-ui) by adding your source, processors, and destinations.
1. After your pipeline has been configured, click **Export Pipeline**.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_draft_pipeline.fce10e9554e408ebf99d50df9cfcd005.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_draft_pipeline.fce10e9554e408ebf99d50df9cfcd005.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The export button highlighted in the pipeline UI" /%}
1. Click the copy or download button to export the configuration as JSON or Terraform.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_json_modal.959cbe80cc243692e68b875c45014dc2.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_json_modal.959cbe80cc243692e68b875c45014dc2.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The export modal showing the pipeline configuration in JSON" /%}
1. Deploy the pipeline configuration using the [API](https://docs.datadoghq.com/api/latest/observability-pipelines.md#create-a-new-pipeline) or [Terraform](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/observability_pipeline).
1. [Install the Worker](https://docs.datadoghq.com/observability_pipelines/configuration/install_the_worker.md#api-or-terraform-pipeline-setup) to start sending and processing data through the pipeline.

## Export the configuration of a deployed pipeline{% #export-the-configuration-of-a-deployed-pipeline %}

A deployed pipeline has a Worker installed to send data through the pipeline and can be either active or inactive.

### Export a pipeline's configuration{% #export-a-pipelines-configuration %}

When viewing a deployed pipeline in the UI, you can export its configuration to JSON or Terraform to programmatically create it.

1. Navigate to [Observability Pipelines](https://app.datadoghq.com/observability-pipelines/).
1. Select a deployed pipeline (status can be `active` or `inactive`) to view the configuration.
1. Click **Export Pipeline**.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_deployed_pipeline.85f8a23785933b4208889b75ddeafdc6.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_deployed_pipeline.85f8a23785933b4208889b75ddeafdc6.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The export button on a deployed pipeline page" /%}
1. Click the copy or download button to export the configuration as JSON or Terraform.
1. Update the JSON or Terraform configuration for any additional changes you want to make and then deploy the configuration programmatically.
   - [API documentation](https://docs.datadoghq.com/api/latest/observability-pipelines.md#update-a-pipeline)
   - [Terraform documentation](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/observability_pipeline)

### Export a pipeline's configuration after making edits to the pipeline{% #export-a-pipelines-configuration-after-making-edits-to-the-pipeline %}

When editing a deployed pipeline, you can add new components such as [Packs](https://docs.datadoghq.com/observability_pipelines/packs.md) or update volume control rules in the UI and export the configuration to JSON or Terraform to deploy the changes programmatically.

1. Navigate to [Observability Pipelines](https://app.datadoghq.com/observability-pipelines/).
1. Select a deployed pipeline (status can be either `active` or `inactive`) to view the configuration.
1. Make changes to your source, destinations, or processors.
1. Before exiting the pipeline, click **Export Pipeline**.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_deployed_pipeline_edit.1ed04b1b0c9199014d57b12b78a5a25b.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_deployed_pipeline_edit.1ed04b1b0c9199014d57b12b78a5a25b.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The export button highlighted on the pipeline edit page" /%}
1. Click the copy or download button to export the configuration as JSON or Terraform.
   - **Note**: After making updates to your pipeline in the UI, the exported configuration includes the latest changes, even if you haven't saved or deployed the changes.
     {% image
        source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_terraform_modal.9d5fe1fc845802cfdc6090ca5f342f26.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/export_terraform_modal.9d5fe1fc845802cfdc6090ca5f342f26.png?auto=format&fit=max&w=850&dpr=2 2x"
        alt="The export modal showing the pipeline configuration in Terraform" /%}
1. Click the Observability Pipelines logo on the top left side of the page to exit the pipeline without saving the changes made in the UI.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/exit_export_deployed_pipeline.cd2bbb0b12af019bd1b959b34133315f.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/exit_export_deployed_pipeline.cd2bbb0b12af019bd1b959b34133315f.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The Observability Pipelines log highlighted on the pipeline page" /%}
1. Use the copied or downloaded configuration to programmatically update your pipeline.
   - [API documentation](https://docs.datadoghq.com/api/latest/observability-pipelines.md#update-a-pipeline)
   - [Terraform documentation](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/observability_pipeline)

## Import a pipeline's JSON configuration to the UI{% #import-a-pipelines-json-configuration-to-the-ui %}

To help build your pipelines and transfer pipeline configurations across Datadog orgs, you can also import a pipeline's JSON to the UI.

1. Navigate to [Observability Pipelines](https://app.datadoghq.com/observability-pipelines/).
1. Select a draft pipeline to view the configuration.
1. Click on the settings and select **Import Pipeline**
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/import_access.a79a202174cfef7a62b22f78ef89c2a3.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/import_access.a79a202174cfef7a62b22f78ef89c2a3.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The settings menu showing Import Pipeline" /%}
1. Choose a pipeline configuration as a JSON file from your computer.
   {% image
      source="https://docs.dd-static.net/images/observability_pipelines/export_pipeline/import_select.48e8ff9b178a53ddf15f947b9f4131d7.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/observability_pipelines/export_pipeline/import_select.48e8ff9b178a53ddf15f947b9f4131d7.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The import modal giving the option to select a JSON file" /%}
1. Click Import. This replaces your current pipeline configuration with the imported JSON's pipeline configuration.
1. [Install the Observability Pipelines Worker and deploy your pipeline using the UI](https://docs.datadoghq.com/observability_pipelines/configuration/install_the_worker.md?tab=docker#pipeline-ui-setup).

## Further reading{% #further-reading %}

- [Set up a pipeline](https://docs.datadoghq.com/observability_pipelines/configuration/set_up_pipelines.md)
- [Update an existing pipeline](https://docs.datadoghq.com/observability_pipelines/configuration/update_existing_pipelines.md)
- [Observability Pipelines API](https://docs.datadoghq.com/api/latest/observability-pipelines.md)
- [Observability Pipelines Terraform resource](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/observability_pipeline)
