Using services in another region
If you have a service instance that is created and bound to apps in one region, you can use this service instance in another region by one of the following methods:
- Use the service credentials to configure your app instance directly. See Connecting services to external apps for details.
- Create a user-provided service as a bridge.
To use a service instance that exists in another region, complete the following steps:
-
To switch to the region where the service instance exists, click the Navigation menu icon > Resource list. Then, expand the LOCATION menu and select the region.
-
Retrieve the credentials and the connection parameters from the VCAP_SERVICES environment variable of the service instance in the region where the service exists. Complete the following steps:
- In the IBM Cloud Dashboard, click View all on your apps tile. The Overview page is displayed.
- In the navigation pane, click Credentials. The VCAP_SERVICES environment variable details are displayed. Record the JSON content for the service instance.
-
Switch to the region where you want to use the service instance. Click the Navigation menu icon > Resource list. Then, expand the LOCATION menu and select the region where you want to use the service instance.
-
Create a user-provided service instance by using the credentials and connection parameters that you recorded from the VCAP_SERVICES environment variable.
-
Bind the user-provided service instance to your app by using the following command:
ibmcloud service bind myapp user-provided_service_instance