Search code examples
postgresqljenkinsibm-cloud

How to delete IBMCloud database instances with having same names


enter image description hereI am having following same named instances as shown in image Names are as follows:-

  1. stage-tas-postgres-service
  2. stage-tas-postgres-service
  3. stage-tas-postgres-service And I am tried to delete it from three dots option but since the stage environment is blocked for deletion activity.

I have referred the below link for deletionIBM Cloud Deletion DB

We have IAM identity and through which tried to delete the instance from Jenkins job and the command I tried to delete after successful login into IAM user is as follows :-

stage("Deleting resource") {
  ibmcloud "resource service-instance-delete stage-tas-postgres-service --recursive"
}

The problem is this job ends with success results, but did not delete the instance. I am using only 3rd from all list and other two are unused show in image and in above list.

Is there any way to delete the DB from crn or deployment id

Thanks in advance.


Solution

  • The error says that you do not have the required permissions to delete the database. You can see and probably use that database instance, but not delete it.

    It seems you are not the account owner or someone with administrator privilege. Therefore, someone else needs to delete the service.

    For the future, you could set up a serviceID with the required permissions. Then, use a script which uses the serviceID for login to IBM Cloud and deletion of that service.