I deleted a project in IBM Cloud Code Engine some days ago. Now, I wanted to reuse the project name, but I am running into the following error:
$ ibmcloud ce project create -n foobar
FAILED
A project named 'foobar' with id 'xxxx' already exists in region 'us-south',
resource group 'default'. Select a different name.
I looked into it and it shows the project as "soft deleted". What can I do to reuse the name? How do I delete the project?
$ ibmcloud ce project list
Getting projects...
OK
Name ID Status Enabled Selected Tags Region Resource Group Age
foobar xxxx soft deleted false false us-south default 3d
The reason for the error is that many types of resources within IBM Cloud are not deleted immediately, but retained for 7 days. The resources can be reclaimed within that period or deleted for good.
When you delete an IBM Cloud Code Engine, you can "hard delete" the project. In that case it is really gone and the name can be reused immediately.
To hard delete the project use the --hard
option:
ibmcloud ce project delete --name foobar --hard -f
Or, on your soft-deleted project, use this command to delete it for good:
ibmcloud resource reclamations
ibmcloud resource reclamation-delete the-id-from-previous-command