# 

# exoscale_sks_nodepool (Resource)

Manage Exoscale [Scalable Kubernetes Service (SKS)](https://community.exoscale.com/product/compute/containers/) Node Pools.

## Example Usage

```terraform
resource "exoscale_sks_cluster" "my_sks_cluster" {
  zone = "ch-gva-2"
  name = "my-sks-cluster"
}

resource "exoscale_sks_nodepool" "my_sks_nodepool" {
  cluster_id         = exoscale_sks_cluster.my_sks_cluster.id
  zone               = exoscale_sks_cluster.my_sks_cluster.zone
  name               = "my-sks-nodepool"

  instance_type      = "standard.medium"
  size               = 3
}
```

Please refer to the [examples](https://github.com/exoscale/terraform-provider-exoscale/tree/master/examples/)
directory for complete configuration examples.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `cluster_id` (String) ❗ The parent [exoscale_sks_cluster]({{< ref "./sks_cluster.md" >}}) ID.
- `instance_type` (String) The managed compute instances type (`<family>.<size>`, e.g. `standard.medium`; use the [Exoscale CLI](https://github.com/exoscale/cli/) - `exo compute instance-type list` - for the list of available types).
- `name` (String) The SKS node pool name.
- `size` (Number)
- `zone` (String) ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.

### Optional

- `anti_affinity_group_ids` (Set of String) A list of [exoscale_anti_affinity_group]({{< ref "./anti_affinity_group.md" >}}) (IDs) to be attached to the managed instances.
- `deploy_target_id` (String) A deploy target ID.
- `description` (String) A free-form text describing the pool.
- `disk_size` (Number) The managed instances disk size (GiB; default: `50`).
- `instance_prefix` (String) The string used to prefix the managed instances name (default `pool`).
- `ipv6` (Boolean) Enable IPV6 for the nodepool nodes
- `kubelet_image_gc` (Block Set) Configuration for this nodepool's kubelet image garbage collector (see [below for nested schema](#nestedblock--kubelet_image_gc))
- `labels` (Map of String) A map of key/value labels.
- `nvidia_mig_profile` (String) The NVIDIA [Multi-Instance GPU (MIG)](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/) profile to enable on the managed GPUs. The GPU family is inferred from `instance_type`: `gpua30.*` accepts `2g.12gb`, `1g.6gb+me`, `1g.6gb`, `2g.12gb+me`, `4g.24gb`; `gpurtx6000pro.*` accepts `1g.24gb-me`, `1g.24gb`, `2g.48gb-me`, `2g.48gb`, `4g.96gb+gfx`, `1g.24gb+me`, `2g.48gb+me.all`, `1g.24gb+gfx`, `1g.24gb+me.all`, `4g.96gb`, `2g.48gb+gfx`.
- `private_network_ids` (Set of String) A list of [exoscale_private_network]({{< ref "./private_network.md" >}}) (IDs) to be attached to the managed instances.
- `security_group_ids` (Set of String) A list of [exoscale_security_group]({{< ref "./security_group.md" >}}) (IDs) to be attached to the managed instances.
- `storage_lvm` (Boolean) Create nodes with non-standard partitioning for persistent storage (requires min 100G of disk space) (may only be set at creation time).
- `taints` (Map of String) A map of key/value Kubernetes [taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) ('taints = { <key> = "<value>:<effect>" }').
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `created_at` (String) The pool creation date.
- `id` (String) The SKS node pool ID.
- `instance_pool_id` (String) The underlying [exoscale_instance_pool]({{< ref "./instance_pool.md" >}}) ID.
- `state` (String) The current pool state.
- `template_id` (String) The managed instances template ID.
- `version` (String) The managed instances version.

<a id="nestedblock--kubelet_image_gc"></a>
### Nested Schema for `kubelet_image_gc`

Optional:

- `high_threshold` (Number) The percent of disk usage after which image garbage collection is always run
- `low_threshold` (Number) The percent of disk usage before which image garbage collection is never run
- `min_age` (String) The minimum age for an unused image before it is garbage collected (k8s duration format, eg. 1h)


<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String)
- `delete` (String)
- `read` (String)
- `update` (String)

-> The symbol ❗ in an attribute indicates that modifying it, will force the creation of a new resource.

## Import

An existing SKS node pool may be imported by `<cluster-ID>/<nodepool-ID>@<zone>`:

```shell
terraform import \
  exoscale_sks_nodepool.my_sks_nodepool \
  f81d4fae-7dec-11d0-a765-00a0c91e6bf6/9ecc6b8b-73d4-4211-8ced-f7f29bb79524@ch-gva-2
```

