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

[Feature] resource_cluster data source

Open scott-the-programmer opened this issue 1 year ago • 4 comments

To be close to feature complete, we should implement the ability to reference an existing minikube cluster as a data source

The goal is to allow users to reference previously created clusters (either created via the cli, or through a separate terraform stack) by specifying something like

data "minikube_cluster" "some_cluster" {
    cluster_name = "some_existing_cluster_name"
}

provider "kubernetes" {
  host = minikube_cluster.some_cluster.host

  client_certificate     = data.minikube_cluster.some_cluster.client_certificate
  client_key             = data.minikube_cluster.some_cluster.client_key
  cluster_ca_certificate = data.minikube_cluster.some_cluster.cluster_ca_certificate
}

scott-the-programmer avatar Dec 23 '23 03:12 scott-the-programmer