Search code examples
ibm-cloud

IBM Cloud: How to find details on deleted, but not reclaimed resource located in a deleted resource group?


I have deleted a service instance in my IBM Cloud account. I can see that it is listed for scheduled reclamation:

$ ibmcloud resource reclamations
List all resource reclamations under account someID as Henrik...
OK

ID                                     Resource Instance ID                   Entity CRN                                                                                                            State            Target Time   
eb51adc4-xxxx-xxxx-xxxx-b83ec1fb2f8f   b4c05160-yyyy-yyyy-yyyy-fa42e60d7778   crn:v1:bluemix:public:cloudcerts:us-south:a/someID:b4c05160-yyyy-yyyy-yyyy-fa42e60d7778::   SCHEDULED        2021-09-28T06:31:01Z   

When I try to look up details on the resource instance using the given ID, it cannot find it. Why? How can I see details?

$ ibmcloud resource service-instance b4c05160-yyyy-yyyy-yyyy-fa42e60d7778
Retrieving service instance b4c05160-yyyy-yyyy-yyyy-fa42e60d7778 in resource group default under account Henrik's Account as Henrik...
FAILED
Service instance b4c05160-yyyy-yyyy-yyyy-fa42e60d7778 was not found

Solution

  • If the resource group is still available, adding it to "ibmcloud resource service-instance" as parameter should help find the resource and fetch its details.

    If the resource group has been deleted, then the resource controller API needs to be used. Use something like the following with TOKEN being an IAM access token.

    curl -s -X GET https://resource-controller.cloud.ibm.com/v2/resource_instances/b4c05160-yyyy-yyyy-yyyy-fa42e60d7778 -H "Authorization: $TOKEN"