| page_title | stackit_ske_machine_image_versions Data Source - stackit |
|---|---|
| subcategory | |
| description | Returns a list of supported Kubernetes machine image versions for the cluster nodes. |
Returns a list of supported Kubernetes machine image versions for the cluster nodes.
data "stackit_ske_machine_image_versions" "example" {
version_state = "SUPPORTED"
}
locals {
flatcar_supported_version = one(flatten([
for mi in data.stackit_ske_machine_image_versions.example.machine_images : [
for v in mi.versions :
v.version
if mi.name == "flatcar" # or ubuntu
]
]))
}
resource "stackit_ske_cluster" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example"
kubernetes_version = "x.x"
node_pools = [
{
name = "np-example"
machine_type = "x.x"
os_version = local.flatcar_supported_version
os_name = "flatcar"
minimum = "2"
maximum = "3"
availability_zones = ["eu01-1"]
volume_type = "storage_premium_perf6"
volume_size = "48"
}
]
}region(String) Region override. If omitted, the provider’s region will be used.version_state(String) Filter returned machine image versions by their state. Possible values are:SUPPORTED.
machine_images(Attributes List) Supported machine image types and versions. (see below for nested schema)
Read-Only:
name(String) Name of the OS image (e.g.,ubuntuorflatcar).versions(Attributes List) Supported versions of the image. (see below for nested schema)
Read-Only:
cri(List of String) Container runtimes supported (e.g.,containerd).expiration_date(String) Expiration date of the version in RFC3339 format.state(String) State of the image version.version(String) Machine image version string.