Thought this could work, but it doesn't:
heroku appname --region=eu
This works, but I already have an existing app, so this does not make sense for me:
heroku create --region eu
Or for an addon:
heroku addons:list --region=eu
You can use heroku info <APP-NAME> to find the Region ID. It will display some data like below. As you can see the Region ID is us . Then, you can use heroku regions command to find the regions belong to the ID.
There is NO native ability just to switch region, but still there is a way how to do this.
Create fork of the app in a region you need.
For example, you have app in US region and you want to migrate it to EU:
The heroku fork command is no longer included with the Heroku CLI by default, but it is available via a plugin with the following command:
heroku plugins:install heroku-fork
Run this command to create a new app that will be a copy of existing:
heroku fork --from sourceapp --to targetapp --region eu
After check if it is working, check (and copy-paste if needed) settings, permissions, addons, etc. They might copy too, but it is better to check.
Rename sourceapp
to something like sourceapp_old
.
Rename targetapp
to sourceapp
.
NOTE: But still this method has few cons:
Anyhow, I'd recommend to read official Heroku documentation before doing so risky actions like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With