Skip to content

kupe_cluster

Create and manage a Kubernetes cluster. Create and update wait for Running; delete waits for removal. Configure timeouts if needed.

resource "kupe_cluster" "prod" {
name = "prod"
version = "1.32"
resources = {
cpu = "4"
memory = "16Gi"
storage = "100Gi"
}
}
resource "kupe_cluster" "prod_eu1" {
name = "prod-eu1"
version = "1.35"
high_availability = true
resources = {
cpu = "8"
memory = "32Gi"
storage = "200Gi"
}
}
output "prod_eu1_ha_phase" {
description = "One of pending | ha-healthy | ha-degraded | ha-unavailable"
value = kupe_cluster.prod_eu1.ha_phase
}
  • name (String) Cluster name (immutable after creation). A lowercase DNS label starting with a letter, without --. The Kupe platform also limits the tenant and cluster names together to 52 characters and refuses a longer cluster name when it is created.
  • display_name (String, Deprecated) Use name instead.

  • high_availability (Boolean) Enable HA at creation. Changing this on an existing resource replaces the cluster, destroying its workloads and storage. Create a separate cluster and migrate first.

  • resources (Attributes) Resource limits for the cluster. Updates send a partial PATCH that includes only the fields present in this block. Fields you omit are left unchanged on the server. To change an individual field, write it explicitly. Removing the entire resources block sends an empty resources object to the server to request clearing the limits. (see below for nested schema)

  • timeouts (Attributes) (see below for nested schema)

  • version (String) Kubernetes version (e.g., 1.31).

  • created_at (String) Timestamp when the cluster was created.

  • endpoint (String) Cluster API server endpoint.

  • etag (String) Resource version used for optimistic locking during updates.

  • ha_configured (Boolean) Whether high availability is ready.

  • ha_phase (String) Consumer-friendly HA rollup. One of pending, ha-healthy, ha-degraded, ha-unavailable. Empty for non-HA clusters. Use this in downstream automation to branch on operational state without inspecting individual conditions.

  • phase (String) Current cluster phase, for example Pending, Provisioning, Running, Upgrading, Degraded or Terminating.

Optional:

  • cpu (String) CPU limit (e.g., 4, 500m).
  • memory (String) Memory limit (e.g., 16Gi, 512Mi).
  • storage (String) Storage limit (e.g., 100Gi).

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as “30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

Import is supported using the following syntax:

The terraform import command can be used, for example:

Terminal window
terraform import kupe_cluster.prod prod