From 37a726c24cd773e86a7984bece9fd5199f692898 Mon Sep 17 00:00:00 2001 From: Reham Tarek Date: Thu, 22 Aug 2024 14:08:29 +0100 Subject: [PATCH] Fix terraform variables --- terraform/eks/daemon/awsneuron/main.tf | 4 ++-- terraform/eks/daemon/awsneuron/variables.tf | 9 +++++++++ terraform/eks/daemon/hyperpod/main.tf | 4 ++-- terraform/eks/daemon/hyperpod/variables.tf | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/terraform/eks/daemon/awsneuron/main.tf b/terraform/eks/daemon/awsneuron/main.tf index 87ea02b0a..e0d562e91 100644 --- a/terraform/eks/daemon/awsneuron/main.tf +++ b/terraform/eks/daemon/awsneuron/main.tf @@ -47,10 +47,10 @@ resource "aws_eks_node_group" "this" { min_size = 1 } - ami_type = "AL2_x86_64" + ami_type = var.ami_type capacity_type = "ON_DEMAND" disk_size = 20 - instance_types = ["t3.medium"] + instance_types = [var.instance_type] depends_on = [ aws_iam_role_policy_attachment.node_AmazonEC2ContainerRegistryReadOnly, diff --git a/terraform/eks/daemon/awsneuron/variables.tf b/terraform/eks/daemon/awsneuron/variables.tf index 4cb2a7904..712f76d5f 100644 --- a/terraform/eks/daemon/awsneuron/variables.tf +++ b/terraform/eks/daemon/awsneuron/variables.tf @@ -26,3 +26,12 @@ variable "k8s_version" { default = "1.28" } +variable "ami_type" { + type = string + default = "AL2_x86_64" +} + +variable "instance_type" { + type = string + default = "t3.medium" +} diff --git a/terraform/eks/daemon/hyperpod/main.tf b/terraform/eks/daemon/hyperpod/main.tf index a810d8c75..53631c683 100644 --- a/terraform/eks/daemon/hyperpod/main.tf +++ b/terraform/eks/daemon/hyperpod/main.tf @@ -47,10 +47,10 @@ resource "aws_eks_node_group" "this" { min_size = 1 } - ami_type = "AL2_x86_64" + ami_type = var.ami_type capacity_type = "ON_DEMAND" disk_size = 20 - instance_types = ["t3.medium"] + instance_types = [var.instance_type] labels = { "beta.kubernetes.io/instance-type" : "ml.t3.medium", "sagemaker.amazonaws.com/node-health-status" : "Schedulable", } diff --git a/terraform/eks/daemon/hyperpod/variables.tf b/terraform/eks/daemon/hyperpod/variables.tf index e7dbbc9eb..3f903f41a 100644 --- a/terraform/eks/daemon/hyperpod/variables.tf +++ b/terraform/eks/daemon/hyperpod/variables.tf @@ -33,5 +33,5 @@ variable "ami_type" { variable "instance_type" { type = string - default = "t3a.medium" + default = "t3.medium" }