I’m sure I am missing something, but how can I duplicate a Project Environment? There is an option to create a new Environment, but that only creates empty secret pairs.
Currently, I am having to consider making a change to 50 odd secrets, saving them and then removing the changes so that I can save them again as correct values.
Doing something like exporting all the values and then importing them is not an option as all the variable substitution is processed during exporting step.
Sadly the compare feature does not help as it only provides the comparison of 2 Environments, rather than any way to copy between Environments. On a side note compare currently calls Environments configs and so does not follow the terms used across the documentation.
Although this is not something that is built into our product yet, you can achieve this using the Doppler CLI, bash, and jq.
It works by taking the output of the raw secret values from one config (so references are captured correctly) and uses bash process substitution to supply the output as a file to the doppler secrets upload command.
For example, if you wanted to migrate the secrets dev to stg: