Skip to main content

Reference for the teleport_kube_cluster Terraform resource

Report an Issue

This page describes the supported values of the teleport_kube_cluster resource of the Teleport Terraform provider.

Example Usage

resource "teleport_kube_cluster" "my-cluster" {
  version = "v3"
  metadata = {
    name = "test"
    labels = {
      example               = "yes"
      "teleport.dev/origin" = "dynamic"
    }
  }

  spec = {
    kubeconfig = file("./my-cluster-kubeconfig.yaml")
  }
}

Schema

Required

  • version (String) Version is the resource version.

Optional

Nested Schema for metadata

Required:

  • name (String) Name is an object name

Optional:

  • description (String) Description is object description
  • expires (String) Expires is a global expiry time header can be set on any resource in the system.
  • labels (Map of String) Labels is a set of labels

Nested Schema for spec

Optional:

  • aws (Attributes) AWS holds the required AWS information for Teleport to access the cluster. (see below for nested schema)
  • azure (Attributes) Azure holds the required Azure information for Teleport to access the cluster. (see below for nested schema)
  • dynamic_labels (Attributes Map) DynamicLabels are the cluster's dynamic labels. (see below for nested schema)
  • gcp (Attributes) GCP holds the required GCP information for Teleport to access the cluster. (see below for nested schema)
  • kubeconfig (String, Sensitive) Kubeconfig is the kubeconfig file payload that grants access to the cluster. If multiple contexts are specified, the first will be selected.

Nested Schema for spec.aws

Optional:

  • account_id (String) AccountID is a AWS Account ID.
  • name (String) Name is a AWS EKS cluster name.
  • region (String) Region is a AWS cloud region.

Nested Schema for spec.azure

Optional:

  • resource_group (String) ResourceGroup is the Azure resource group name.
  • resource_name (String) ResourceName is the AKS cluster name.
  • subscription_id (String) SubscriptionID is the AKS cluster SubscriptionID.
  • tenant_id (String) TenantID is the AKS cluster Tenant ID.

Nested Schema for spec.dynamic_labels

Optional:

  • command (List of String) Command is a command to run
  • period (String) Period is a time between command runs
  • result (String) Result captures standard output

Nested Schema for spec.gcp

Optional:

  • location (String) Location is a GKE cluster location.
  • name (String) Name is a GCP GKE cluster name.
  • project_id (String) ProjectID is the GKE Project ID.