4
votes

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

2

2 Answers

9
votes

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.

0
votes

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.