How to remove a lien from Google Cloud project?

后端 未结 5 2383
耶瑟儿~
耶瑟儿~ 2021-02-20 03:10

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         


        
5条回答
  •  感情败类
    2021-02-20 03:36

    Perform 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.

提交回复
热议问题