I've been trying to clear out everything and delete my Google account, but it won't let me because I apparently still have GCP resources.
I deleted all projects, etc, and it continued to say I had issues. So I'm trying to check liens and I'm getting:
% gcloud alpha resource-manager liens list
ERROR: (gcloud.alpha.resource-manager.liens.list) PERMISSION_DENIED: The caller does not have permission
- '@type': type.googleapis.com/google.rpc.ResourceInfo
resourceName: projects/vpc-host-prod-ez552-co631
There is no project named "projects/vpc-host-prod-ez552-co631", and I can't find what the missing permission might be. At one point that project may have existed, but everything has been deleted and removed from the "pending deletion" queue for some time now.
Hi @dangelovich,
Welcome to the Google Cloud Community!
Please try reauthorizing by typing the command gcloud auth login
in your Cloud Shell.
If it didn't work, you can try removing the lien[1]:
gcloud alpha resource-manager liens list
gcloud alpha resource-manager liens delete [LIEN_NAME]
Please let me know if it worked. Thank you! 😃
[1]. https://cloud.google.com/resource-manager/docs/project-liens#removing_liens_from_a_project
Reauthorizing works, but the liens list produces the same output as I originally posted.
Yes, after listing the liens, you can run the commandgcloud alpha resource-manager liens delete [LIEN_NAME]
to delete the liens.
No no, I mean the output still doesn't list any liens. Just a permission error:
% gcloud alpha resource-manager liens list
ERROR: (gcloud.alpha.resource-manager.liens.list) PERMISSION_DENIED: The caller does not have permission
- '@type': type.googleapis.com/google.rpc.ResourceInfo
resourceName: projects/vpc-host-prod-ez552-co631
%
Either there are no liens, or I can't view liens because of a permission error on a project that doesn't exist.
I encountered a similar problem. However, the project wasn't deleted in my case - I was just removed from it.
Google and Chat GPT weren't very helpful. Almost all gcloud commands were resulting in that permission error you describe.
Here's how you solve it:
You run:
grep -r --exclude-dir=logs "<YOUR_DELETED_PROJECT_ID>" ~/.config/gcloud
in your case the project ID is the one from the error message: vpc-host-prod-ez552-co631
You'll find two places where the removed project is listed:
- .config/gcloud/configurations/config_default
- .config/gcloud/application_default_credentials.json
Change it manually in those files to a new desired existing project
Hi @dangelovich
Sometimes old projects leave behind stuck resources. You can try contacting Google Cloud Support and request a manual cleanup. They can help remove leftover liens or permissions that block account deletion. Hope it gets resolved soon!