Suspending and Removing Orgs
cloud.gov Operators are responsible for suspending and activating cf orgs for
the platform. The following documentation covers how to do that.
We do not delete orgs when we are suspending them because it is usually due to a lapse in funding rather than a need to delete the org.
Suspending and stopping applications
Suspending a cloud.gov org is done using the cf curl command. A cloud.gov
Operator sets the status of the org as suspended and stops all applications in
all spaces. Use the cg-script/suspend-org.sh script in the
cg-scripts repository to suspend orgs and stop applications.
To facilitate the un-suspending of orgs, cloud.gov Operators only stop applications and do not remove any routes, domains, services, or service-bindings. Suspended orgs are placed into a read-only state which only CF admins (cloud.gov Operators) may access or change anything in the org. Read more about suspending orgs and RBAC in this documentation.
Un-suspending and starting applications
Un-suspending a cloud.gov org is done using the cf curl command. A cloud.gov
Operator sets the status of the org as active and starts all applications in
all spaces. Use the cg-script/activate-org.sh script in the
cg-scripts repository to un-suspend orgs and start applications.
Querying org statuses
Finding which orgs are already suspended is done via the following cf curl
command.
cf curl '/v2/organizations?q=status:suspended' | jq -r '(.resources[] | "org GUID: " + .metadata.guid, "org Status: " + .entity.status, "org Name: " + .entity.name)'
These results may be paginated. Check pagination by using the following
cf curl command. You must change the URL to whatever is in Previous
URL or Next URL with the previous command to get to the suspended orgs.
cf curl '/v2/organizations?q=status:suspended' | jq -r '"Total Results: " + (.total_results | tostring), "Total Page: " + (.total_pages | tostring), "Previous URL: " + .prev_url, "Next URL" + .next_url'
Removing orgs
In cases where orgs need to be deleted, we give customers limited time to export their data. Afterwards, we delete the org, spaces, services, and service-keys for the given org. Refer to the CF CLI reference guide.