frostmoln_kubernetes_node_pool (Resource)
Manages an additional node pool on a managed Kubernetes cluster. The cluster's INITIAL node pool is owned by the frostmoln_kubernetes_cluster resource (its initial_node_pool block) and cannot be managed here. A cluster must keep at least one node pool — deleting the last one is refused by the API.
Example Usage
terraform
data "frostmoln_kubernetes_flavors" "available" {}
# An additional node pool on an existing managed Kubernetes cluster. The
# cluster's initial pool is owned by the frostmoln_kubernetes_cluster resource
# (its initial_node_pool block) — this resource manages extra pools only.
resource "frostmoln_kubernetes_node_pool" "workers" {
cluster_id = frostmoln_kubernetes_cluster.main.id
name = "workers" # optional — a "pool-<8 hex>" name is generated when omitted
flavor_id = data.frostmoln_kubernetes_flavors.available.flavors[0].id
node_count = 2 # scaled in-place; name/flavor changes replace the pool
}Schema
Required
cluster_id(String) The ID of the Kubernetes cluster this pool belongs to.flavor_id(String) The node flavor ID (see the frostmoln_kubernetes_flavors data source). Pools cannot change flavor — changing it REPLACES the pool.
Optional
name(String) The name of the node pool: a lowercase DNS label (a-z, 0-9, non-leading/trailing hyphens) of at most 18 characters — it becomes part of each node's hostname. Defaults to a generated "pool-<8 hex>" name. Pools cannot be renamed — changing it REPLACES the pool. Pool names are unique per cluster, so an explicitly named pool cannot uselifecycle { create_before_destroy = true }— the replacement create conflicts with the still-live pool.node_count(Number) The number of worker nodes in the pool (1-100). Scaled in-place. Omitting it manages the pool at 1 node — an out-of-band scale will be reverted on the next apply.
Read-Only
created_at(String) The timestamp when the node pool was created.id(String) The unique identifier of the node pool.status(String) The current status of the node pool.updated_at(String) The timestamp when the node pool was last updated.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
shell
# Import with the composite ID {cluster_id}/{pool_id}. The cluster's INITIAL
# pool cannot be imported here — it is owned by frostmoln_kubernetes_cluster.
terraform import frostmoln_kubernetes_node_pool.workers 51455a51-db3d-4231-ac27-4fee2553c15f/9f6b1a7e-9a30-4a6a-8f2e-1f1c9be2b6d1