banzaicloud / terraform-provider-k8s

Kubernetes Terraform provider with support for raw manifests
https://registry.terraform.io/providers/banzaicloud/k8s
MIT License
135 stars 30 forks source link

Add cascade delete option #35

Closed pbalogh-sa closed 4 years ago

pbalogh-sa commented 4 years ago

Signed-off-by: Peter Balogh p.balogh.sa@gmail.com

Q A
Bug fix? no
New feature? yes
API breaks? no
Deprecations? no
Related tickets fixes #X, partially #Y, mentioned in #Z
License Apache 2.0

What's in this PR?

In the case of destroying a job, the pods aren't deleted. With this feature, we can set a cascade delete.

resource "k8s_manifest" "job" {
  content = "${data.template_file.job.rendered}"
  delete_cascade = true
}