Configuration Automation - Ping CLI

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. 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.

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:

pingcli config get export.services
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:

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