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 id 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 id.
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 id 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.
  • control_plane_version (String) The Kubernetes patch version the control plane runs (e.g. 1.35.3). The platform chooses patches and rolls them (in the maintenance window on a single control-plane node), so this changes without any change to your configuration. Null while the platform does not know it (a cluster not created, rolled or updated since it started recording it).
  • 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) Always null: the id of the load balancer behind the API endpoint is internal, has no public form, and the API no longer returns it.
  • maintenance (Attributes) The cluster's read-only maintenance state. (see below for nested schema)
  • maintenance_window (Attributes) The cluster's recurring weekly window for disruptive platform updates. While maintenance.enforced is true, the platform schedules them by it: a started run can finish after the window ends, and a security deadline, an urgent update, or a window too short for the update can start one outside it. On three control-plane nodes the control-plane update is not tied to the window. (see below for nested schema)
  • 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.

Nested Schema for maintenance ​

Read-Only:

  • enforced (Boolean) Whether the platform schedules disruptive updates by maintenance_window. While false, the window is not in force and updates can run outside it.
  • next_window_start (String) When the next occurrence starts (RFC 3339). Null if the platform can no longer load the time zone.
  • pending (Attributes List) Window-bound updates that have not reached this cluster yet. While enforced is true each is eligible from the next window, which does not promise it runs then: the platform can defer a rollout. (see below for nested schema)

Nested Schema for maintenance.pending ​

Read-Only:

  • deadline (String) When this update becomes eligible in a slot the platform assigned, whatever the window says (RFC 3339), if you have been told of a deadline.
  • kind (String) control_plane or workers.

Nested Schema for maintenance_window ​

Read-Only:

  • days (Set of String) The local days an occurrence starts on (mon to sun).
  • duration_hours (Number) Elapsed hours from the start.
  • start_time (String) Local start, HH:MM, 24-hour.
  • time_zone (String) An IANA time zone name.