diff --git a/src/_nebari/stages/infrastructure/__init__.py b/src/_nebari/stages/infrastructure/__init__.py index fb1d45d53..adb73feb8 100644 --- a/src/_nebari/stages/infrastructure/__init__.py +++ b/src/_nebari/stages/infrastructure/__init__.py @@ -619,10 +619,11 @@ def _check_input(cls, data: Any) -> Any: if hasattr(node_group, "__getitem__") else node_group.instance ) - if instance not in available_instances: - raise ValueError( - f"Amazon Web Services instance {node_group.instance} not one of available instance types={available_instances}" - ) + for instance_name in instance.split(","): + if instance_name not in available_instances: + raise ValueError( + f"Amazon Web Services instance {instance_name} not one of available instance types={available_instances}" + ) # check if kms key is valid available_kms_keys = amazon_web_services.kms_key_arns(data["region"]) diff --git a/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf b/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf index b0db3ac4a..9184fc4fe 100644 --- a/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf +++ b/src/_nebari/stages/infrastructure/template/aws/modules/kubernetes/main.tf @@ -91,7 +91,7 @@ resource "aws_eks_node_group" "main" { node_role_arn = aws_iam_role.node-group.arn subnet_ids = var.node_groups[count.index].single_subnet ? [element(var.cluster_subnets, 0)] : var.cluster_subnets - instance_types = [var.node_groups[count.index].instance_type] + instance_types = split(",", var.node_groups[count.index].instance_type) capacity_type = var.node_groups[count.index].spot ? "SPOT" : "ON_DEMAND" ami_type = var.node_groups[count.index].ami_type disk_size = var.node_groups[count.index].launch_template == null ? 50 : null