Cannot delete tunnel because it has active connections | Terraform
Hello! I currently use Cloudflare tunnels to expose internal applications to the developers. Dashboards, DB GUI, etc.
As our applications are running in Kubernetes, I use the Crossplane Terraform provider to deploy the tunnel using Terraform along their application helm charts.
On the terraform workspace deletion, I encounter the following issue:
It appears when the cloudflared pod stopped already. (so there shouldn't be any connections left)
So here is what I tried, without success:
As our applications are running in Kubernetes, I use the Crossplane Terraform provider to deploy the tunnel using Terraform along their application helm charts.
On the terraform workspace deletion, I encounter the following issue:
It appears when the cloudflared pod stopped already. (so there shouldn't be any connections left)
So here is what I tried, without success:
- Delete the
pod first, before cleaning up the TF workspace.cloudflared - Clean up the TF workspace first, then delete the pod.
- Add a
lifecycle.preStophook to my cloudflare pod, running the commandcloudflared tunnel cleanup TUNNEL_NAME.