I have a Google Cloud project that I want to delete.
However, when I press delete and enter the project id, I get the following error messages:
The project has a lien against it.
Tracking Number: {tracking number}
How do I delete the lien so that I can delete the project?
Thanks.
All project data associated with Google Cloud and Google APIs services becomes inaccessible. After a 30-day waiting period, the project and associated data are permanently deleted from the console. Note that after the 30-day waiting period ends, the time it takes to completely delete a project may vary.
>-
icon beside search bar on top right cornergcloud alpha resource-manager liens list
which will give you the list of liensPerform following steps as mentioned in Google Cloud's documentation on Forcibly delete a host project (Source: https://cloud.google.com/vpc/docs/deprovisioning-shared-vpc#removelien):
1) Authenticate to gcloud as an IAM member who can remove a project lien. If you have an organizational policy that limits which members can remove liens, you must authenticate as an IAM member with the resourcemanager.lienModifier role for your organization. If you do not have such a policy in place, the project owner for the host project can remove the lien.
Replace [ACCOUNT]
with the name of the appropriate IAM member:
gcloud auth login [ACCOUNT]
2) List the liens associated with the host project. Replace [HOST_PROJECT_ID]
with the ID of the host project.
gcloud alpha resource-manager liens list \
--project [HOST_PROJECT_ID]
3) Remove each lien by name, one at a time, until no more liens are present. Replace [LIEN_NAME]
with the name of the lien to remove.
gcloud alpha resource-manager liens delete [LIEN_NAME] \
--project [HOST_PROJECT_ID]
4) Confirm that all liens have been removed.
gcloud alpha resource-manager liens list \
--project [HOST_PROJECT_ID]
5) After removing the lien, you can log out of gcloud to protect the credentials of the IAM member which has permission to remove liens.
gcloud auth revoke [ACCOUNT]
6) The host project can now be shut down.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With