Affected: Flags
Overview
This topic explains how to migrate feature flags from one LaunchDarkly project to another. LaunchDarkly does not currently support built-in project-to-project migration. However, you can recreate feature flags manually, use the REST API to script the migration, or explore alternative tools like Terraform or experimental scripts from LaunchDarkly Labs.
Solution
There are several workaround options:
Option 1: Use the LaunchDarkly UI
You can manually recreate feature flags in the new project using the LaunchDarkly UI. To learn more, read Creating new flags.
Option 2: Use the REST API
You can retrieve flag configurations from the source project and recreate them in the target project using LaunchDarkly's REST API.
- Use the List feature flags API to retrieve all flags from your current project.
- Use the Create feature flag API to create the same flags in the new project.
This process works best if you script the calls and transform the output to match the input format required by the creation endpoint.
Option 3: Use the Project Migrator Script
LaunchDarkly Labs maintains an experimental project migrator script* that automates the migration process.
*Note: This tool is provided as-is through LaunchDarkly Labs. It is experimental software and not officially supported. Use it with caution, especially in production environments.
Option 4: Use Terraform
You can also use the Terraform integration to define and provision identical LaunchDarkly projects. While there isn’t an automatic export tool, you can manually create Terraform configurations based on your existing project setup. Then, update the configuration to reference the new project key and run terraform apply
to recreate your flags.
For more guidance, read Merging LaunchDarkly accounts.