Creating and Modifying Quota Plans
Page last updated: August 19, 2015
This page assumes you are using cf CLI v6.
Quota plans are named sets of memory, service, and instance usage quotas. For example, one quota plan might allow up to 10 services, 10 routes, and 2 GB of RAM, while another might offer 100 services, 100 routes, and 10 GB of RAM. Quota plans have user-friendly names, but are referenced in Cloud Foundry internal systems by unique GUIDs.
Quota plans are not directly associated with user accounts. Instead, every organization has a list of available quota plans, and the account admin assigns a specific quota plan from the list to the organization. Everyone in the organization shares the quotas described by the plan. There is no limit to the number of defined quota plans an account can have, but only one plan can be assigned at a time.
Quota Plan Attributes
| Name | Description | Valid Values | Example Value | 
|---|---|---|---|
| name | The name you use to identify the plan | A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique. | silver_quota | 
| memory_limit | Maximum memory usage allowed | An integer and a unit of measurement like M, MB, G, or GB | 2048M | 
| non_basic_services_allowed | Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned. | true or false | true | 
| total_routes | Maximum routes allowed | An integer | 500 | 
| total_services | Maximum services allowed | An integer | 25 | 
| trial_db_allowed | Legacy Field. Value can be ignored. | true or false | true | 
Default Quota Plan
Cloud Foundry installs with one default quota plan with the following limits:
Memory Limit: 10240 MB
Total Routes: 1000
Total Services: 100
Non-basic Services Allowed: True
Trial DB Allowed: True
Creating a New Quota Plan
You can create a new quota plan in one of two ways:
- Directly modify the CF deployment manifest before deploying.
 - Use 
cf create-quotaafter deploying. 
Modifying the Manifest
- In a terminal window, run 
bosh edit deploymentto open the deployment manifest YAML file in your default text editor. - Search for “quota_definitions”.
 Add a new quota definition with limits that you specify. Use the default quota definition as a formatting template.
The following example shows the
quota_definitionsportion of thecf.ymlmanifest after adding the “silver_quota” plan:quota_definitions: default: memory_limit: 10240M non_basic_services_allowed: true total_routes: 1000 total_services: 100 trial_db_allowed: true silver_quota: memory_limit: 2048M non_basic_services_allowed: true total_routes: 500 total_services: 25 trial_db_allowed: trueSave and close the deployment manifest.
Using cf create-quota
In a terminal window, run the following command. Replace the placeholder attributes with the values for this quota plan:
$ cf create-quota  QUOTA [-m MEMORY] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans]
Example:
$ cf create-quota small -m 2048M -r 10 -s 10 --allow-paid-service-plans
Modifying a Quota Plan
You can modify an existing quota plan in one of two ways:
- Directly modify the CF deployment manifest before deploying.
 - Use 
cf update-quotaafter deploying. 
Modifying the Manifest
- In a terminal window, run 
bosh edit deploymentto open the deployment manifest YAML file in your default text editor. - Search for “quota_definitions”.
 - Modify the value of the attribute.
 - Save and close the deployment manifest.
 
Using cf update-quota
Run
cf quotasto find the names of all quota definitions available to your organization. Note the name of the quota plan to be modified.$ cf quotas Getting quotas as [email protected]... OK name total memory limit instance memory limit routes service instances paid service plans free 0 0 1000 0 disallowed paid 10G 0 1000 -1 allowed small 2G 0 10 10 allowed trial 2G 0 1000 10 disallowedRun
cf update-quotawith the name of the quota. Use the appropriate flags to specify the attributes.
cf update-quota QUOTA [-m MEMORY] [-n NEW_NAME] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]
Example:
$ cf update-quota small -m 4096M -n medium -r 20 -s 20 --allow-paid-service-plans
Note: To create or modify quotas for individual spaces rather than across an entire organization, you can use the space-quota command. It is almost identical to the quota command. For example: to create a quota for a space, use create-space-quota. To modify that quota, use the update-quota command. The org manager sets and manages the space quotas.