Delete GCP Project With a Lien


A project lien in Google Cloud Platform (GCP) is a mechanism for preventing the deletion of a project until the lien is removed. Liens are typically used to protect projects that are considered to be important or that contain resources that are used by other projects.

There are two main types of project liens:

  • User-created liens: These liens are created by users to protect projects from accidental deletion.
  • System-generated liens: These liens are created automatically by GCP to protect projects that contain certain types of resources, such as shared VPC networks.

How to Delete a Google Cloud Project

Are you experiencing issues when trying to delete your Google Cloud project? Are you seeing an error in the project interface? If you are receiving any of these error messages when you delete one of your Google Cloud projects – You have come to the right place – This blog can help you.

Below is the dreaded error message:

The project has a lien against it.

A “lien” is a lock you can put on an account to prevent accidental deletion, it is easy to apply a lien without even knowing you have enabled the feature. You can still delete a project with a Lien against it – here is how to do it:

Step 1 – Log into the Google Cloud Console

Open your browser and log in to the Google Cloud Console – https://cloud.google.com/

Step 2 – Start the gCloud Console

From the Google Cloud Interface, open the Google Cloud console (gcloud)

Wait for the console to start, if you havent used GCloud before it will take a few moments to start your GCloud Resources

Once the console is started, connect to the require project by typing

gcloud config set project <my-project>

Step 3 – Validate your Project has a Lien

You can validate the lien by typing

gcloud alpha resource-manager liens list
click to zoom

Step 4 – Delete the Lein

To delete the lien type

gcloud alpha resource-manager liens delete [LIEN_NAME]
Click to zoom

You can now delete the project. That’s it.

For further information and technical details, the Google Cloud documentation is a great resource for all things Google Cloud Projects.

Step 6 – Delete the Project

In this example, we will move over to the Google Cloud Console

Navigate to IAM and Admin, then press the Settings Button

Make sure you have your project selected at the top, in this example the project is called a “Richards Backups”. Then hit the “Shutdown” button to close and delete the project.

Confirm the project name and then shutdown

If successful, you should get this confirmation

Elsewhere On TurboGeek:  Use AWS-Vault to manage access to AWS

Richard.Bailey

Richard Bailey, a seasoned tech enthusiast, combines a passion for innovation with a knack for simplifying complex concepts. With over a decade in the industry, he's pioneered transformative solutions, blending creativity with technical prowess. An avid writer, Richard's articles resonate with readers, offering insightful perspectives that bridge the gap between technology and everyday life. His commitment to excellence and tireless pursuit of knowledge continues to inspire and shape the tech landscape.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate ยป