Skip to content

[Bug]: Running apply then destroy on LKE leaves orphaned Linode #1962

@Miro-Andrin

Description

@Miro-Andrin

Terraform Version

OpenTofu v1.10.2

Linode Provider Version

3.0.0

Effected Terraform Resources

linode_lke_cluster

Terraform Config Files

No response

Debug Output

No response

Panic Output

No response

Expected Behavior

LKE and all the nodes created get destroyed.

Actual Behavior

A single Linode is orphaned

linodes-before-destroy-is-called.csv

linodes-after-destroy-completes.csv

Steps to Reproduce

Call tofu apply followed by destroy on this:

terraform {
  required_providers {
    linode = {
      source = "linode/linode"
      version = "3.0.0"
    }
  }
}

variable "LINODE_TOKEN" {
  description = "Linode API token"
  type        = string
  sensitive   = true
}

provider "linode" {
  token = var.LINODE_TOKEN
}

resource "linode_lke_cluster" "prod_cluster" {
    label       = "prod-cluster"
    k8s_version = "1.32"
    region      = "se-sto"
    tags        = ["prod"]

    pool {
        type  = "g6-standard-2"
        count = 3
        labels = {
            "environment" = "prod"
        }
    }
}

output "kubeconfig_prod" {
  value = linode_lke_cluster.prod_cluster.kubeconfig
  sensitive = true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissues that report a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions