Skip to content

frostmoln_kubernetes_cluster (Data Source) ​

Look up a managed Kubernetes cluster by ID or name. Exactly one of id or name must be specified.

This is how a configuration reaches a cluster that Terraform did not create: a cluster provisioned in the portal or with fm can today be referenced only by a hardcoded UUID or plumbed through terraform_remote_state — both of which tie the configuration to one deployment. Look it up by name instead and the reference survives re-provisioning elsewhere; the endpoint and CIDRs feed other references, while the credential material is fetched separately by frostmoln_kubernetes_cluster_kubeconfig.

A name lookup that matches NOTHING fails the read, and so does one that matches MORE THAN ONE cluster: the data source refuses to pick for you (the diagnostic names the colliding ids). Deletes are soft — a deleted cluster's row answers 200 with status deleted forever — and a deleted cluster is reported as ABSENT, on the id path and in the name search, so a gone cluster can never resolve.

API-key callers need the kubernetes:read scope; a refused read fails on every path rather than answering with an empty row.

The addons collection is deliberately NOT part of this schema: one collection, one owner — the addon selection (and the per-addon applied versions) is read with frostmoln_kubernetes_cluster_addons.

Example Usage ​

terraform
# Resolve a managed Kubernetes cluster that Terraform did not create
# (provisioned in the portal or with `fm`) by NAME — no hardcoded UUID.
data "frostmoln_kubernetes_cluster" "billing" {
  name = "billing-prod"
}

# The resolved cluster feeds non-secret references elsewhere — the API
# endpoint, the CIDRs, the region (the credential material itself is fetched
# separately by frostmoln_kubernetes_cluster_kubeconfig).
locals {
  apiserver_vip = data.frostmoln_kubernetes_cluster.billing.endpoint
  workloads_vpc = data.frostmoln_kubernetes_cluster.billing.vpc_id
}

# A lookup by id behaves identically for clusters whose UUID is already known.
data "frostmoln_kubernetes_cluster" "by_id" {
  id = data.frostmoln_kubernetes_cluster.billing.id
}

# A name that matches nothing — or more than one cluster — fails the read
# loudly rather than picking a cluster for you. A deleted cluster is reported
# as absent on both paths (deletes are soft: the deleted row answers 200
# forever, and this data source refuses to resolve it).

# The addons collection is NOT part of this data source: read the cluster's
# addon selection (and its applied versions) with
# frostmoln_kubernetes_cluster_addons.

Schema ​

Optional ​

  • id (String) The unique identifier of the Kubernetes cluster. Exactly one of id or name must be specified.
  • name (String) The name of the Kubernetes cluster. Exactly one of id or name must be specified.

Read-Only ​

  • ca_cert_hash (String) A NON-SECRET reference to the cluster CA (a hash). The server only ever returns the hash, never the CA itself, so this attribute is not secret and not sensitive. The actual credential material — the kubeconfig with its client key — lives on frostmoln_kubernetes_cluster_kubeconfig, not here.
  • control_plane_tier (String) The named control-plane plan (development, production, …) that sizes the cluster's dedicated control plane — its HA shape, not a customer tenancy.
  • created_at (String) The timestamp when the cluster was created.
  • endpoint (String) The load-balancer VIP fronting the API server — the address kube clients reach the cluster on. Null while provisioning has not produced one.
  • failed_step (String) The provisioning phase the cluster failed in: one of validation, control_plane, api_endpoint, addons, node_pool or provisioning. Set only when status is error, and may be absent even then.
  • ha_enabled (Boolean) Whether the dedicated control plane is high-availability.
  • load_balancer_id (String) The ID of the load balancer behind the API endpoint — the only load balancer this surface reports.
  • pod_cidr (String) The cluster's per-cluster pod CIDR, allocated from the managed pool. Null while the platform has not allocated one.
  • public_ip (String) The public IP of the API endpoint, null when the endpoint is not internet-reachable (an enclave cluster's private VIP has none).
  • region (String) The region the cluster lives in.
  • service_cidr (String) The cluster's per-cluster service CIDR, allocated OUTSIDE the infra 10.96.0.0/12 range to avoid colliding with platform services. Null while the platform has not allocated one.
  • status (String) The current status of the cluster. On this read surface the status is always a LIVE cluster's status: a soft-deleted cluster is reported as absent rather than rendered, so deleted never lands in state.
  • status_message (String) A human-readable description of why the cluster failed. Set only when status is error.
  • status_reason (String) Why the cluster failed, as a failure class (e.g. QuotaExceeded). Set only when status is error.
  • subnet_id (String) The subnet the cluster's nodes run in.
  • tags (Map of String) Every resource tag on the cluster — the same set as the resource's tags_all: your own key/value metadata, never applied to the cluster or its nodes. An empty map when the cluster has none. The cluster's node pools carry their own tags (the initial pool got a one-time copy of these at create).
  • tenant_id (String) The tenant ID that owns this cluster.
  • updated_at (String) The timestamp when the cluster was last updated, null when the platform has not recorded one.
  • version (String) The Kubernetes version (the wire's kubernetesVersion).
  • vpc_id (String) The VPC the cluster's nodes run in.