terraform-metal-multiarch-k8s icon indicating copy to clipboard operation
terraform-metal-multiarch-k8s copied to clipboard

add output variables that will be helpful in module use

Open displague opened this issue 3 years ago • 1 comments

Modules that depend on this module to create a Kubernetes cluster will need access to the resources created by this module.

The current output variable, Kubernetes_Cluster_Info, has no description (and is not included in the README documentation). This makes it hard to identify what this value is and how it can be used.

Some output variables that would be helpful to have (or to have similar variables):

  • kube config file for accessing the cluster (so the kubernetes or helm provider, etc can be used to add features to the cluster)
  • API addresses of the cluster (v4, v6, so that users can use other DNS providers to assign the address to a name)
  • address of worker nodes per each pool (so that additional ssh providers can be used to lock down the workers or install other tools)

displague avatar Jan 19 '21 19:01 displague

For example, a user consuming this project as a module may wish to further configure the cluster with more Terraform configuration:

module "multiarch-k8s" {
  source  = "equinix/multiarch-k8s/metal"
  version = "0.1.0"

  auth_token = "..."
  project_id = "..."
}

provider "kubernetes" {
  config_path    = "" # PATH to multiarch-k8s k8s config is not include as an output variable
}

resource "kubernetes_namespace" "example" {
  metadata {
    name = "my-first-namespace"
  }
}

displague avatar Apr 18 '21 11:04 displague