Use the cf create-space command to create spaces in your Cloud Foundry organization using the Cloud Foundry Command Line Interface (cf CLI).
-
(Enterprise accounts only) Create at least one subaccount and enable the Cloud Foundry environment in this subaccount. For more information, see Create a Subaccount and Create Orgs.
In a trial account, the Cloud Foundry environment is automatically activated, and a first space named dev is created.
-
You have the Org Manager role in the organization in which you want to create a space. For more information about roles and permissions, see https://docs.cloudfoundry.org/concepts/roles.html.
-
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.
-
Make sure that you are in the Cloud Foundry organization you want to add a space to.
cf target -o ORGTo get a list of your organizations, call
cf orgs. -
Enter the following string, specifying a name for the new space, the name of the organization, and the quota you'd like to assign to it:
cf create-space SPACE [-o ORG] [-q SPACE_QUOTA] -
(Optional) Set this space as target by executing:
cf target -o ORG -s SPACEIf you are assigned to only one Cloud Foundry organization and space, the system automatically targets you to the relevant Cloud Foundry organization and space when you log on.
Related Information
Delete Spaces Using the Cloud Foundry Command Line Interface