Unable to delete a empty folder

1,180 views
Skip to first unread message

Bharath

unread,
Nov 18, 2021, 4:07:47 AM11/18/21
to Google Cloud Developers
Hello Friends

I am trying to delete an empty folder but I am getting the below error:
Screen Shot 2021-11-18 at 2.34.34 PM.png
So I tried to list any resources in that folder:
gcloud beta asset search-all-resources --scope=folders/264172463135

output:
- assetType: cloudresourcemanager.googleapis.com/Folder
  displayName: fldr-common
  location: global
  name: //cloudresourcemanager.googleapis.com/folders/264172463135

gcloud resource-manager folders list --folder=264172463135
Listed 0 items.

I am not finding a way to delete this folder. Can anyone please help?

Sergi Ferre Albiol

unread,
Nov 19, 2021, 9:29:58 AM11/19/21
to Google Cloud Developers

Hello,

It seems that you still have a descendant resource attached to the folder. The folder cannot be deleted until all child resources are deleted. I would suggest to check which are the active resources by following the answers from this Stackoverflow post and also by checking this documentation. Once the active resources are identified, please delete them and then try to delete the folder again.

Reply all
Reply to author
Forward
0 new messages