terraform-provider-kubernetes icon indicating copy to clipboard operation
terraform-provider-kubernetes copied to clipboard

kubernetes_deployment doesn't delete resources ( limits & requests ) from kubernetes resource

Open bohdantverdyi opened this issue 3 years ago • 6 comments

Terraform Version, Provider Version and Kubernetes Version

Terraform version: v0.14.9
Kubernetes provider version: v2.0.3
Kubernetes version: v1.18.14

Affected Resource(s)

  • kubernetes_deployment

Terraform Configuration Files

resource "kubernetes_deployment" "test" {
  metadata {
    name = "test"
  }
  spec {
    selector {
      match_labels = {
        app = "test"
      }
    }

    template {
      metadata {
        labels = {
          app = "test"
        }
      }
      spec {
        container {
          name = "test"
          image = "nginx"
          resources {
            requests = {
              memory = 100
            }
          }
        }
      }
    }
  }
}

Steps to Reproduce

  1. Describe kubernetes_deployment with resources { some limits, some requests} block.
  2. terraform apply --> yes
  3. Delete resources {} block from resource.
  4. terraform apply --> nothing to change

Expected Behavior

Terraform should delete 'resources' block, from kubernetes deployment.

Actual Behavior

Resources limit & requests still exist in kubernetes deployment resource. Terraform shows noting to change.

bohdantverdyi avatar Apr 13 '21 15:04 bohdantverdyi

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

github-actions[bot] avatar Apr 14 '22 00:04 github-actions[bot]

Remove stale

bohdantverdyi avatar Apr 14 '22 04:04 bohdantverdyi

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

github-actions[bot] avatar Apr 15 '23 00:04 github-actions[bot]

Remove stale

bohdantverdyi avatar Apr 15 '23 01:04 bohdantverdyi

Any reason MR wasn't accepted?

ptixed avatar Jul 25 '23 10:07 ptixed

We are facing the same issue. @ptixed which MR are you refering?

MichaelBitard avatar Dec 08 '23 09:12 MichaelBitard