i’m working on a project to automate the management of a chat-bot platform based on DialogFlow.
I made a Terraform template that create a project, a DialogFlow agent and some other infrastructures. The creation phase doesn’t have any kind of issue and it all runs smoothly.
Anyway I’ve noticed that after accessing for the first time the DialogFlow agent, it creates on background and independently of what has been defined within the Terraform template, a lien with the GCP project.
If I run a terraform destroy command after that, Terraform will delete the DialofFlow agent and will throw an error before the destruction of the project because of this “hidden” lien.
I tried to refresh the state for Terraform but it still couldn’t identify the presence of the lien so I had to remove it manually before the terraform destroy.
Of course having to deal with a small number of projects and dialogflow agents this is not a big deal, but I was just wondering if there is a way with Terraform to deal with this kind of hidden liens that may be created not only by DialogFlow agents but also by other types of resources that can alter the state of the infrastructure and create issues with the lifecycle management within Terraform.