Skip to content

Commit

Permalink
feat: Allow users to specify the Windows Server version; 2019 (defa…
Browse files Browse the repository at this point in the history
…ult) or `2022` (#1078)

Co-authored-by: igor lopes <igoreul@amazon.com>
Co-authored-by: Bryant Biggs <bryantbiggs@gmail.com>
  • Loading branch information
3 people authored Oct 25, 2022
1 parent 70a43b4 commit bc1c58e
Showing 1 changed file with 3 additions and 1 deletion.
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}-*"
}

predefined_ami_types = keys(local.predefined_ami_names)
Expand Down

0 comments on commit bc1c58e

Please sign in to comment.