From a42a3c12bccfa9b6dc0fc2d6d490be36dabe452e Mon Sep 17 00:00:00 2001 From: orlov-a Date: Tue, 13 Feb 2024 15:06:58 +0300 Subject: [PATCH] added data block to main.tf for automatic k8s version pickup --- main.tf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index a701cfc..0cff3cc 100644 --- a/main.tf +++ b/main.tf @@ -103,12 +103,18 @@ resource "openstack_networking_floatingip_associate_v2" "association_1" { ] } +data "selectel_mks_kube_versions_v1" "versions" { + project_id = module.project-with-user.project_id + region = "ru-9" +} + # Создаем MKS с cpu и gpu нод группами module "mks" { source = "./modules/mks/k8s-cluster-standalone" cluster_name = "gh-cluster-test" - kube_version = "1.29.1" # Здесь важно выбрать доступную версию, может протухнуть + kube_version = data.selectel_mks_kube_versions_v1.versions.latest_version + #kube_version = "1.29.1" # Здесь важно выбрать доступную версию, может протухнуть os_availability_zone = "ru-9a" os_region = "ru-9"