问题
I am trying to delete a GCP project, but each time I get a message that says:
Error
The project has a lien against it.
Tracking Number:
Can anyone advise?
回答1:
I fixed this problem by deleting a Dialogflow agent associated with the project:
- Go to https://console.dialogflow.com
- Click on settings item in the top left (the cog icon next to the agent name)
- Confirm that this agent is in the project you are trying to delete. If it is not, select the agent that is in the project
- Click 'Delete this Agent' at the bottom of the page, and follow the instructions to delete the agent
- Try to delete the project again
回答2:
Delete Dialogflow associated agent with the project as explained on previous solution.
If still failed, you could delete the project liens manually as follows:
- Go to Google Cloud Shell & Set to your project.
@cloudshell:~ ($project)$gcloud config set project [PROJECT_ID]
- Try to delete your project.
@cloudshell:~ ($project)$ gcloud projects delete [PROJECT_ID]
Your project will be deleted.
Do you want to continue (Y/n)? Y
ERROR: (gcloud.projects.delete) FAILED_PRECONDITION: active child resource
- '@type':type.googleapis.com/google.rpc.PreconditionFailure violations:
description: active child resource
subject: services/$service
- '@type':type.googleapis.com/google.rpc.ResourceInfo
resourceName: projects/$project
resourceType: PROJECT
- List Project liens
@cloudshell:~ ($project)$gcloud alpha resource-manager liens list
NAME ORIGIN REASON
p1061081023732-l3d8032b3-ea2c-4683-ad48-5ca23ddd00e7 user@example.com testing
- Delete Project liens
@cloudshell:~ ($project)$gcloud alpha resource-manager liens delete [LIEN_NAME]
- Then again delete Project
@cloudshell:~ ($project)$ gcloud projects delete [PROJECT_ID]
The project should be deleted right now.
来源:https://stackoverflow.com/questions/47337549/google-cloud-platform-not-allowing-project-shut-down-due-to-lien