kubernetesgoogle-kubernetes-enginedisaster-recovery

Can we enable deletion-protection on GKE cluster similar to GCP VMs?


What the title says.

I want to prevent the accidental deletion of my GKE cluster, like VMs, where I can set the deletion-protection ON.

I checked the documentation, and terraform configs as well, but couldn't find any solution for the same.

Is there a way, this can be implemented? One way I can think of is to disallow via IAM, so no one has access to cluster deletion.


Solution

  • Looks like it's available now on google_container_cluster resource of terraform. I have no idea for to module "gke" way though.

    Please also check the manual https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster