terraform-provider-kubectl: Wait=true does not appear to be working as intended...

According to the documentation, the wait property when set like wait=true should wait for a given resource to be properly destroyed right?

My namespace (and some other kind of resources) have specific finalizers that take their time to complete, but when using this provider, it just seems to delete resources in a fire-and-forget fashion which is not desired. I can confirm this “erratic” behavior, because when I manually delete the namespace using kubectl cli, it sits there waiting for the namespace to be deleted before returning…

Am I missing something, or the wait function is not working as intended?

Tested on terraform 0.14.x and 0.15.x.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

@calexandre @vrabbi if you are willing to try a patched version while waiting for the PR to be merged

terraform {
  required_version = ">= 1.0"
  required_providers {
   
    kubectl = {
      // keep override until https://github.com/gavinbunney/terraform-provider-kubectl/issues/109 is merged and released
      #      source  = "gavinbunney/kubectl"
      #      version = ">= 1.13.0"
      version = "1.13.1-1"
      source  = "alekc-forks/kubectl"
    }
  }
}

@calexandre weird, it’s working on my end. Did you put a “wait=true” on the resource? can you paste your hcl for the ns and check that in terraform init output you have 1.13.1-1 version loaded up.

facepalm

You are right. I totally forgot the wait=true… I confirm that it is working and it waits for the resource to be terminated…

Thank you!