Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow users to specify the Windows Server version; 2019 (default) or 2022 #1078

Merged
merged 8 commits into from
Oct 25, 2022
4 changes: 3 additions & 1 deletion modules/aws-eks-self-managed-node-groups/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ locals {
capacity_rebalance = false
spot_allocation_strategy = "capacity-optimized-prioritized"
launch_template_os = "amazonlinux2eks" # amazonlinux2eks/bottlerocket/windows # Used to identify the launch template
windows_server_version = "2019"
pre_userdata = ""
post_userdata = ""
kubelet_extra_args = ""
Expand Down Expand Up @@ -50,11 +51,12 @@ locals {
)

enable_windows_support = local.self_managed_node_group["launch_template_os"] == "windows"
windows_server_version = local.self_managed_node_group["windows_server_version"]

predefined_ami_names = {
amazonlinux2eks = "amazon-eks-node-${var.context.cluster_version}-*"
bottlerocket = "bottlerocket-aws-k8s-${var.context.cluster_version}-x86_64-*"
windows = "Windows_Server-2019-English-Core-EKS_Optimized-${var.context.cluster_version}-*"
windows = "Windows_Server-${local.windows_server_version}-English-Core-EKS_Optimized-${var.context.cluster_version}-*"
bryantbiggs marked this conversation as resolved.
Show resolved Hide resolved
}

predefined_ami_types = keys(local.predefined_ami_names)
Expand Down