简体   繁体   中英

Unable to delete Google Cloud Platform Project due to linked to a Dialogflow agent

I was trying to delete a GCP Project but the following error keeps popping up.

Lien origin
You cannot delete this project because it is linked with a Dialogflow agent. 
Please follow the link to Dialogflow and delete the agent: Redirect Link

Description
Deletion blocked by Dialogflow. Remove lien

I deleted the DialogFlow Agent and the redirect link now shows No Agent and redirects me to the getStarted Page

But GCP still shows the same Lien Origin error.

Can anyone help me to resolve this error?

Thanks.

As suggested by @yyyyahir, I filed an issue here: https://issuetracker.google.com/issues/162802477 which gave me two options. The second one is the one working for me. First, issue the command gcloud alpha resource-manager liens list --project project_ID . Note it is project_ID , not the project name. For example: not sany-agent but sany-agent-koajku . Then you should see something like below:

NAME                                     ORIGIN                                                                                                                                                                         REASON
p8849062...0d88f4e77c  You cannot delete ... a Dialogflow agent. Please follow the link to Dialogflow and delete the agent: https://console.dialogflow.com/api-client/#/agent/63e6667c-...-cbfa0e8cd4d7/  Deletion blocked by Dialogflow.

Issue the command gcloud alpha resource-manager liens delete p8849062...0d88f4e77c which should result something like this:

Deleted [liens/p88490624627...50d88f4e77c].

NOTE: I shorten the UUID.

After that, go ahead and shut down the project. You should able to do that as the lien have been removed.

GCP has a management feature called liens that protect projects from deletion.

You can check the lien in your project with the following gcloud command:

gcloud alpha resource-manager liens list

In your particular case, it might be related to Dialogflow project having more than one owner. This operation requires that other owners are removed from your project .

The given answer didn't work for me. Delete command is changed a little bit now. Here is what I did to solve the issue:

  1. Open Cloud Shell

  2. Run the below command and replace with the actual project id

     gcloud config set project project-id 
  3. Run the below command to list all liens

    gcloud alpha resource-manager liens list 
  4. Run the below command to delete the lien by entering the desired lien-id which you received in step 3.

     gcloud alpha resource-manager liens delete liens/lien-id 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM