Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move a Heroku addon from one app to another

Tags:

heroku

I am sharing a MongoDB between a few heroku apps and would like to move the ownership/billing to another app.

I have tried attaching (heroku addons:attach) to the receiving app and then using the heroku addons:detach command on the billing app, but this doesn't work.

like image 626
Philip Wiebe Avatar asked Jul 16 '18 18:07

Philip Wiebe


People also ask

How do I remove a Heroku addon?

Remove, upgrade, or downgrade an add-onOpen the Heroku Dashboard. On the app's Resources tab, scroll down to the Add-ons section. On the rightmost side of the add-on listing, click the actions button (three vertically-stacked dots) to open the menu. From this menu, you can remove, upgrade, or downgrade the add-on.


1 Answers

Heroku support just confirmed that it is not possible to change the billing app for an add-on.

You can attach the add-on to other apps, but if you delete the original billing app then it will instantly delete your database without warning - even if it is attached to other active apps.

Some add-ons like Postgres offer a fork option, so you may be able fork, reconnect to the new instance, and delete the old database. The Postgres fork command looks like:

heroku addons:create heroku-postgresql:standard-0 --fork the-old-app-name::HEROKU_POSTGRESQL_CHARCOAL --app the-new-app-name

Where HEROKU_POSTGRESQL_CHARCOAL is the ENV variable name of your old database on your old app.

like image 70
bendytree Avatar answered Jan 04 '23 07:01

bendytree