Question

When terraform destroy for DO Kubernetes, My load balance is deployed before it should.

I provision digitalocean_loadbalancer first because I need to provide ip to creating new Cloudflare record.

In the parallel, I also provision nginx_ingress_chart with Helm as well which is attached the config service.annotations.kubernetes\\.digitalocean\\.com/load-balancer-id: digitalocean_loadbalancer.ingress_load_balancer.id as well.

Then I provision kubernetes_ingress right after the nginx_ingress_chart.

The problem is when I run the terraform destroy, Terraform will destroy from the latest first which is kubernetes_ingress And this step, I GUESS DigitalOcean automatically delete the load balancer. That cause the digitalocean_loadbalancer destroy error on the console.

It’s totally working fine as expected but only the error message make me feel that something doesn’t correct.

Does anyone can help on this or ran in the same situation before. Guidances, or answers will be appreciate.

Thanks!

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!