iterative / terraform-provider-iterative

☁️ Terraform plugin for machine learning workloads: spot instance recovery & auto-termination | AWS, GCP, Azure, Kubernetes
https://registry.terraform.io/providers/iterative/iterative/latest/docs
Apache License 2.0
287 stars 27 forks source link

Kubernetes task deletion logic is flawed #647

Open 0x2b3bfa0 opened 1 year ago

0x2b3bfa0 commented 1 year ago

Extracted from https://github.com/iterative/terraform-provider-iterative/pull/645#discussion_r952928197

It's either a bug or some weird workaround @0x2b3bfa0 forgot to document. Sounds like a bug.

https://github.com/iterative/terraform-provider-iterative/blob/7b27c579a56813c6f48627fe6da777d63f46808b/task/k8s/task.go#L205-L207

Should read t.Resources.Job.Delete instead of t.Resources.Job.Create but changing it breaks the tests.