You can bind service instances to applications using the Cloud Foundry Command Line Interface (cf CLI).
-
Download and install the cf CLI and log on to Cloud Foundry. For more information, see Download and Install the Cloud Foundry Command Line Interface and Log On to the Cloud Foundry Environment Using the Cloud Foundry Command Line Interface.
-
Deploy an application in the same space in which you plan to create the service instance. For more information, see Deploy Business Applications in the Cloud Foundry Environment.
-
Create a service instance. For more information, see Create Service Instances Using the Cloud Foundry Command Line Interface.
Open a command line and enter the following string:
cf bind-service APP-NAME SERVICE_INSTANCE [-c PARAMETERS_AS_JSON]
Specify the following parameters:
-
APP_NAME
: Name of the application. -
SERVICE_INSTANCE
: Name of the service instance. -
-c
: (Optional) Provide service-specific configuration parameters either in a valid JSON object in-line or in a parameters file. This file reference can be an absolute or relative path to a file.
Related Information