We are currently experiencing issues with integrating Doppler to Heroku. According to the Docs, Doppler should ignore all variables which are set by Heroku and Heroku add-ons. It seems to do just that for one of our projects, but in the other one there’s a config called HEROKU_APP_DEFAULT_DOMAIN_NAME and it can’t ignore that for some reason.
Error message is:
Secret name “HEROKU_APP_DEFAULT_DOMAIN_NAME” is a reserved name in Heroku
Honestly this is pretty annoying. Another issue was that it can’t automatically transform lowercase env vars to uppercase ones, so that had to be done manually as well.
We recently made a change to add the secrets Heroku’s Dyno Metadata labs feature adds to the list of reserved variables for the Heroku sync. This means that it won’t sync those variables to or from Heroku (since Heroku manages them), but it does also mean that it prevents you from adding a Heroku sync to a Doppler config that already has any of those variables. Do you have the Dyno Metadata labs feature enabled? If so, you should be able to simply remove these variables from Doppler and proceed as per normal.
As far as lowercase → uppercase conversions go – I’m afraid this is simply how Doppler works now. Secrets in Doppler must be in upper-snake case. Our CLI does offer name transformers, but those currently don’t work with syncs.
Thanks for the head’s up about the Dyno Metadata labs feature, wasn’t aware that it was enabled on the project.
Regarding the integration, my initial post was not clear enough about that. The Doppler config that I want to sync to is completely empty, and while setting up the integration I chose the option to import from Heroku. My expectation in this case would be that Doppler would pull all of the secrets from Heroku which are not managed by Heroku or any add-ons. Unfortunately it looks like it fails while pulling them due to the HEROKU_APP_DEFAULT_DOMAIN_NAME.
I’m aware that it would not sync any variables beginning with HEROKU from Doppler → Heroku or vice-versa and that is completely fine. I just don’t get why it doesn’t ignore them while importing, when the Doppler config itself is empty (so there should be no conflicts).
Ah, I see! Hm… I’ll look into what we can do about this. Ideally, it should just ignore those secrets during the import as well. Until we have a fix for this, one workaround is to run heroku config -a APP_NAME, copy the secrets it has, remove the dyno metadata secrets, and then use the Import Secrets option to add them:
Then you can setup the sync without importing any secrets. That should at least unblock you.
@andras I believe we have a fix that will work for this. What will happen is it’ll allow you to import all of the reserved variables, but won’t sync them back to Heroku. As such, you would likely want to remove any you aren’t referencing outside of Heroku from Doppler to avoid confusion once this goes out. I’ll post again once it’s approved and released.
Just wanted to ask approximately how long the fix will take? We have a project that we would like to go live with and it’d be really nice to have the Doppler integration all done for that.
Want to know if it’s a matter of days or weeks to release the fix to the integration, so that we know if we should just do the workarounds instead.
Thank you for the update and for the fix! Just tried it out and works like a charm.
Set up Integration from Doppler to Heroku
Integration passed without any of the previously mentioned errors
The heroku specific environment variables were also copied over, but when those were deleted in Doppler, the changes weren’t propagated to Heroku. As expected!
Thanks again for looking into this and providing a fix so quickly!