---
title: Exporting Platform Configuration
description: Ping CLI can export the administrative configuration of supported Ping Identity products, using the pingcli platform export command. Configuration is exported to the filesystem as a set of files, depending on the selected output format.
component: pingcli
page_id: pingcli::general/exporting-platform-configuration
canonical_url: https://developer.pingidentity.com/pingcli/general/exporting-platform-configuration.html
revdate: March 23, 2025
section_ids:
  benefits-of-using-ping-cli: Benefits of using Ping CLI
  configuration-for-multiple-ping-identity-products-can-be-exported-together: Configuration for multiple Ping Identity products can be exported together
  ping-cli-provides-a-quick-way-to-pull-all-the-configuration-of-an-environment: Ping CLI provides a quick way to pull all the configuration of an environment
  ping-cli-accelerates-the-use-of-terraform-adoption: Ping CLI accelerates the use of Terraform adoption
  exporting-configuration: Exporting configuration
  selecting-ping-identity-product-services: Selecting Ping Identity product services
  output-directory: Output directory
  export-format: Export format
  more-information: More information
---

# Exporting Platform Configuration

Ping CLI can export the administrative configuration of supported Ping Identity products, using the `pingcli platform export` command. Configuration is exported to the filesystem as a set of files, depending on the selected output format.

|   |                                                                                                                       |
| - | --------------------------------------------------------------------------------------------------------------------- |
|   | Currently, Ping CLI only exports configuration in HCL code language for use with Ping Identity's Terraform providers. |

## Benefits of using Ping CLI

Using Ping CLI to export the configuration of a Ping Identity deployment offers a number of benefits.

### Configuration for multiple Ping Identity products can be exported together

Because Ping CLI allows the developer to connect multiple Ping Identity products in a deployment, the `pingcli platform export` command has been designed to be able to export configuration for all connected Ping Identity products together, providing an "integrated platform" view of the configuration for a logical environment.

The `--services` / `-s` option parameter, or the `export.services` configuration key, allows the developer to select configuration export of individual product services if desired.

### Ping CLI provides a quick way to pull all the configuration of an environment

Ping CLI is designed to crawl the administration API to pull out the full configuration of a supported product instance. Developers do not need to understand the configuration in the API to be able to do a full configuration export.

### Ping CLI accelerates the use of Terraform adoption

When exporting configuration in Terraform HCL format, Ping CLI accelerates the adoption of Ping Identity's Terraform providers by:

* Quickly generating all `import {}` blocks needed to import a fully configured environment to Terraform state. This feature is most useful when bringing an existing environment (built without Terraform) under Terraform management without needing to re-define any configuration of that environment.

* Using Terraform's out-of-the-box capability to generate full Terraform HCL for a fully configured environment. This capability is most useful when use cases have been configured in the Ping Identity admin console of a development environment and the Terraform Configuration as code (CaC) equivalent needs to be created to promote the changes to a test or production environment.

## Exporting configuration

As a prerequisite, it is recommended to connect Ping Identity products to the Ping CLI configuration as described in [Connecting Ping Identity Services](cli-configuration-connecting-ping-services.html). After Ping Identity services are connected, Ping CLI can export the configuration of those product deployments.

When exporting the configured platform's configuration, the format is `pingcli platform export [flags]`. You can find more information about supported flags and examples of use in [Command Reference](../command_reference/pingcli_platform_export.html).

### Selecting Ping Identity product services

When running the command without the `--services` / `-s` option parameter, the configuration for the list of services in the `export.services` configuration key is used. The list of configured services can be viewed using the `pingcli config get` command and optionally set using the `pingcli config set` command:

```console
pingcli config get export.services
```

```console
pingcli config set "export.services=pingfederate,pingone-authorize,pingone-mfa,pingone-platform,pingone-protect,pingone-sso"
```

Optionally, setting `--services` / `-s` in the command syntax overrides the configured value:

```console
pingcli platform export \
  --services pingone-authorize,pingone-mfa,pingone-platform,pingone-protect,pingone-sso
```

### Output directory

You can define the desired output directory using the `--output-directory` / `-d` option flag as an absolute or relative path on the filesystem. When configuration is exported, files are created in the specified directory.

By design, if files already exist on the filesystem, Ping CLI won't overwrite the existing files and will instead return an error, expecting that the developer provides a new directory location for exported files. Should the developer want Ping CLI to overwrite any pre-existing files, the `--overwrite` / `-o` option can be specified.

### Export format

Ping CLI supports exporting configuration in different export formats, selectable using the `--format` / `-f` option.

|   |                                                                                                                                                                                 |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Currently, Ping CLI only supports exporting Terraform HCL for use with Ping Identity Terraform providers. More configuration package formats will be available at a later date. |

## More information

* Command Reference: [pingcli platform export](../command_reference/pingcli_platform_export.html)
