Search code examples
cloud-foundrygaia

Creating a service with cf cli with a space seperated plan name


I want to create a service using cf cli with a plan JANUS PROD

According to documentation (http://cli.cloudfoundry.org/en-US/cf/create-service.html) -

SERVICE = external-dependency-service
PLAN = JANUS PROD

My script is -

cf create-service external-dependency-service JANUS PROD -c "<path_to_json>" <service_name>

How to tackle the plan with spaces?


Solution

  • You need to enclose the plan name with quotes (double if on Windows, double or single if on Linux) so that your shell doesn't pass it on as two separate arguments to the CLI:
    cf create-service external-dependency-service "JANUS PROD" -c "<path_to_json>" <service_name>