diff --git a/README.md b/README.md index 84a960af20..d698c17567 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ module "eks" { eks_managed_node_groups = { example = { # Starting on 1.30, AL2023 is the default AMI type for EKS managed node groups - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" instance_types = ["m5.xlarge"] min_size = 2 @@ -292,7 +292,7 @@ module "eks" { example = { # The EKS AL2023 NVIDIA AMI provides all of the necessary components # for accelerated workloads w/ EFA - ami_type = "AL2023_x86_64_NVIDIA" + ami_type = "AL2023_X86_64_NVIDIA" instance_types = ["p5.48xlarge"] # Exposes all EFA interfaces on the launch template created by the node group(s) diff --git a/docs/UPGRADE-17.0.md b/docs/UPGRADE-17.0.md index 2511cf4b2d..a8aa056f91 100644 --- a/docs/UPGRADE-17.0.md +++ b/docs/UPGRADE-17.0.md @@ -43,7 +43,7 @@ Terraform will perform the following actions: - resource "random_pet" "node_groups" { - id = "sincere-squid" -> null - keepers = { - - "ami_type" = "AL2_x86_64" + - "ami_type" = "AL2_X86_64" - "capacity_type" = "SPOT" - "disk_size" = "50" - "iam_role_arn" = "arn:aws:iam::123456789123:role/test-eks-mwIwsvui20210527220853611600000009" diff --git a/docs/UPGRADE-18.0.md b/docs/UPGRADE-18.0.md index 8b3d0accad..54182caf13 100644 --- a/docs/UPGRADE-18.0.md +++ b/docs/UPGRADE-18.0.md @@ -353,7 +353,7 @@ module "eks" { # Managed Node Groups node_groups_defaults = { - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" disk_size = 50 } @@ -456,7 +456,7 @@ module "cluster_after" { subnet_ids = module.vpc.private_subnets eks_managed_node_group_defaults = { - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" disk_size = 50 } @@ -593,7 +593,7 @@ module "cluster_after" { - # Managed Node Groups - node_groups_defaults = { + eks_managed_node_group_defaults = { - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" disk_size = 50 } diff --git a/docs/UPGRADE-19.0.md b/docs/UPGRADE-19.0.md index f626129be1..2909b112c2 100644 --- a/docs/UPGRADE-19.0.md +++ b/docs/UPGRADE-19.0.md @@ -277,7 +277,7 @@ EKS managed node groups on `v18.x` by default create a security group that does # EKS Managed Node Group(s) eks_managed_node_group_defaults = { - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" instance_types = ["m6i.large", "m5.large", "m5n.large", "m5zn.large"] attach_cluster_primary_security_group = true diff --git a/docs/UPGRADE-21.0.md b/docs/UPGRADE-21.0.md index 695c8c80f2..cffa53dd93 100644 --- a/docs/UPGRADE-21.0.md +++ b/docs/UPGRADE-21.0.md @@ -13,14 +13,14 @@ If you find a bug, please open an issue with supporting configuration to reprodu - When enabling `enable_efa_support` or creating placement groups within a node group, users must now specify the correct `subnet_ids`; the module no longer tries to automatically select a suitable subnet. - EKS managed node group: - IMDS now default to a hop limit of 1 (previously was 2) - - `ami_type` now defaults to `AL2023_x86_64_STANDARD` + - `ami_type` now defaults to `AL2023_X86_64_STANDARD` - `enable_monitoring` is now set to `false` by default - `enable_efa_only` is now set to `true` by default - `use_latest_ami_release_version` is now set to `true` by default - Support for autoscaling group schedules has been removed - Self-managed node group: - IMDS now default to a hop limit of 1 (previously was 2) - - `ami_type` now defaults to `AL2023_x86_64_STANDARD` + - `ami_type` now defaults to `AL2023_X86_64_STANDARD` - `enable_monitoring` is now set to `false` by default - `enable_efa_only` is now set to `true` by default - Support for autoscaling group schedules has been removed @@ -221,7 +221,7 @@ module "eks" { eks_managed_node_groups = { efa = { - ami_type = "AL2023_x86_64_NVIDIA" + ami_type = "AL2023_X86_64_NVIDIA" instance_types = ["p5e.48xlarge"] enable_efa_support = true @@ -274,7 +274,7 @@ module "eks" { eks_managed_node_groups = { efa = { - ami_type = "AL2023_x86_64_NVIDIA" + ami_type = "AL2023_X86_64_NVIDIA" instance_types = ["p5e.48xlarge"] iam_role_additional_policies = { diff --git a/docs/compute_resources.md b/docs/compute_resources.md index e7dee7660c..8606a23707 100644 --- a/docs/compute_resources.md +++ b/docs/compute_resources.md @@ -30,7 +30,7 @@ Refer to the [EKS Managed Node Group documentation](https://docs.aws.amazon.com/ bottlerocket_default = { use_custom_launch_template = false - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" } } ``` @@ -40,7 +40,7 @@ Refer to the [EKS Managed Node Group documentation](https://docs.aws.amazon.com/ ```hcl eks_managed_node_groups = { bottlerocket_prepend_userdata = { - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" bootstrap_extra_args = <<-EOT # extra args added @@ -57,7 +57,7 @@ Refer to the [EKS Managed Node Group documentation](https://docs.aws.amazon.com/ eks_managed_node_groups = { custom_ami = { ami_id = "ami-0caf35bc73450c396" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" # By default, EKS managed node groups will not append bootstrap script; # this adds it back in using the default template provided by the module @@ -94,7 +94,7 @@ Refer to the [EKS Managed Node Group documentation](https://docs.aws.amazon.com/ eks_managed_node_groups = { bottlerocket_custom_ami = { ami_id = "ami-0ff61e0bcfc81dc94" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" # use module user data template to bootstrap enable_bootstrap_user_data = true @@ -141,7 +141,7 @@ Refer to the [Self Managed Node Group documentation](https://docs.aws.amazon.com self_managed_node_groups = { bottlerocket = { ami_id = data.aws_ami.bottlerocket_ami.id - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" } } ``` diff --git a/examples/eks-managed-node-group/eks-al2023.tf b/examples/eks-managed-node-group/eks-al2023.tf index 69897a5a04..6535b25283 100644 --- a/examples/eks-managed-node-group/eks-al2023.tf +++ b/examples/eks-managed-node-group/eks-al2023.tf @@ -24,7 +24,7 @@ module "eks_al2023" { example = { # Starting on 1.30, AL2023 is the default AMI type for EKS managed node groups instance_types = ["m6i.large"] - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" min_size = 2 max_size = 5 diff --git a/examples/eks-managed-node-group/eks-bottlerocket.tf b/examples/eks-managed-node-group/eks-bottlerocket.tf index a4a9928d0f..8ce4a69537 100644 --- a/examples/eks-managed-node-group/eks-bottlerocket.tf +++ b/examples/eks-managed-node-group/eks-bottlerocket.tf @@ -22,7 +22,7 @@ module "eks_bottlerocket" { eks_managed_node_groups = { example = { - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" instance_types = ["m6i.large"] min_size = 2 diff --git a/examples/karpenter/main.tf b/examples/karpenter/main.tf index 6f652327c3..63f8cdac29 100644 --- a/examples/karpenter/main.tf +++ b/examples/karpenter/main.tf @@ -79,7 +79,7 @@ module "eks" { eks_managed_node_groups = { karpenter = { - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" instance_types = ["m5.large"] min_size = 2 diff --git a/examples/self-managed-node-group/eks-al2023.tf b/examples/self-managed-node-group/eks-al2023.tf index ca17ac67d9..dfcc3e07be 100644 --- a/examples/self-managed-node-group/eks-al2023.tf +++ b/examples/self-managed-node-group/eks-al2023.tf @@ -22,7 +22,7 @@ module "eks_al2023" { self_managed_node_groups = { example = { - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" instance_type = "m6i.large" min_size = 2 diff --git a/examples/self-managed-node-group/eks-bottlerocket.tf b/examples/self-managed-node-group/eks-bottlerocket.tf index be9b2450a9..0ec29680f7 100644 --- a/examples/self-managed-node-group/eks-bottlerocket.tf +++ b/examples/self-managed-node-group/eks-bottlerocket.tf @@ -22,7 +22,7 @@ module "eks_bottlerocket" { self_managed_node_groups = { example = { - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" instance_type = "m6i.large" min_size = 2 diff --git a/modules/_user_data/README.md b/modules/_user_data/README.md index 610051bc9c..a86772d655 100644 --- a/modules/_user_data/README.md +++ b/modules/_user_data/README.md @@ -37,7 +37,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [additional\_cluster\_dns\_ips](#input\_additional\_cluster\_dns\_ips) | Additional DNS IP addresses to use for the cluster. Only used when `ami_type` = `BOTTLEROCKET_*` | `list(string)` | `[]` | no | -| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_x86_64_STANDARD"` | no | +| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_X86_64_STANDARD"` | no | | [bootstrap\_extra\_args](#input\_bootstrap\_extra\_args) | Additional arguments passed to the bootstrap script. When `ami_type` = `BOTTLEROCKET_*`; these are additional [settings](https://github.com/bottlerocket-os/bottlerocket#settings) that are provided to the Bottlerocket user data | `string` | `""` | no | | [cloudinit\_post\_nodeadm](#input\_cloudinit\_post\_nodeadm) | Array of cloud-init document parts that are created after the nodeadm document part |
list(object({
content = string
content_type = optional(string)
filename = optional(string)
merge_type = optional(string)
}))
| `[]` | no | | [cloudinit\_pre\_nodeadm](#input\_cloudinit\_pre\_nodeadm) | Array of cloud-init document parts that are created before the nodeadm document part |
list(object({
content = string
content_type = optional(string)
filename = optional(string)
merge_type = optional(string)
}))
| `[]` | no | diff --git a/modules/_user_data/main.tf b/modules/_user_data/main.tf index c394421c4c..ee1f940bcb 100644 --- a/modules/_user_data/main.tf +++ b/modules/_user_data/main.tf @@ -14,36 +14,37 @@ resource "null_resource" "validate_cluster_service_cidr" { } locals { - is_al2 = startswith(var.ami_type, "AL2_") - is_al2023 = startswith(var.ami_type, "AL2023_") + ami_type = upper(var.ami_type) + is_al2 = startswith(local.ami_type, "AL2_") + is_al2023 = startswith(local.ami_type, "AL2023_") # Converts AMI type into user data template path ami_type_to_user_data_path = { AL2_ARM_64 = "${path.module}/../../templates/al2_user_data.tpl" - AL2_x86_64 = "${path.module}/../../templates/al2_user_data.tpl" - AL2_x86_64_GPU = "${path.module}/../../templates/al2_user_data.tpl" + AL2_X86_64 = "${path.module}/../../templates/al2_user_data.tpl" + AL2_X86_64_GPU = "${path.module}/../../templates/al2_user_data.tpl" - AL2023_x86_64_STANDARD = "${path.module}/../../templates/al2023_user_data.tpl" + AL2023_X86_64_STANDARD = "${path.module}/../../templates/al2023_user_data.tpl" AL2023_ARM_64_STANDARD = "${path.module}/../../templates/al2023_user_data.tpl" - AL2023_x86_64_NEURON = "${path.module}/../../templates/al2023_user_data.tpl" - AL2023_x86_64_NVIDIA = "${path.module}/../../templates/al2023_user_data.tpl" + AL2023_X86_64_NEURON = "${path.module}/../../templates/al2023_user_data.tpl" + AL2023_X86_64_NVIDIA = "${path.module}/../../templates/al2023_user_data.tpl" AL2023_ARM_64_NVIDIA = "${path.module}/../../templates/al2023_user_data.tpl" BOTTLEROCKET_ARM_64 = "${path.module}/../../templates/bottlerocket_user_data.tpl" - BOTTLEROCKET_x86_64 = "${path.module}/../../templates/bottlerocket_user_data.tpl" + BOTTLEROCKET_X86_64 = "${path.module}/../../templates/bottlerocket_user_data.tpl" BOTTLEROCKET_ARM_64_FIPS = "${path.module}/../../templates/bottlerocket_user_data.tpl" - BOTTLEROCKET_x86_64_FIPS = "${path.module}/../../templates/bottlerocket_user_data.tpl" + BOTTLEROCKET_X86_64_FIPS = "${path.module}/../../templates/bottlerocket_user_data.tpl" BOTTLEROCKET_ARM_64_NVIDIA = "${path.module}/../../templates/bottlerocket_user_data.tpl" - BOTTLEROCKET_x86_64_NVIDIA = "${path.module}/../../templates/bottlerocket_user_data.tpl" + BOTTLEROCKET_X86_64_NVIDIA = "${path.module}/../../templates/bottlerocket_user_data.tpl" - WINDOWS_CORE_2019_x86_64 = "${path.module}/../../templates/windows_user_data.tpl" - WINDOWS_FULL_2019_x86_64 = "${path.module}/../../templates/windows_user_data.tpl" - WINDOWS_CORE_2022_x86_64 = "${path.module}/../../templates/windows_user_data.tpl" - WINDOWS_FULL_2022_x86_64 = "${path.module}/../../templates/windows_user_data.tpl" + WINDOWS_CORE_2019_X86_64 = "${path.module}/../../templates/windows_user_data.tpl" + WINDOWS_FULL_2019_X86_64 = "${path.module}/../../templates/windows_user_data.tpl" + WINDOWS_CORE_2022_X86_64 = "${path.module}/../../templates/windows_user_data.tpl" + WINDOWS_FULL_2022_X86_64 = "${path.module}/../../templates/windows_user_data.tpl" CUSTOM = var.user_data_template_path } - user_data_path = coalesce(var.user_data_template_path, local.ami_type_to_user_data_path[var.ami_type]) + user_data_path = coalesce(var.user_data_template_path, local.ami_type_to_user_data_path[local.ami_type]) cluster_dns_ips = flatten(concat([try(cidrhost(var.cluster_service_cidr, 10), "")], var.additional_cluster_dns_ips)) diff --git a/modules/_user_data/variables.tf b/modules/_user_data/variables.tf index bfc32ab688..4dab6df769 100644 --- a/modules/_user_data/variables.tf +++ b/modules/_user_data/variables.tf @@ -8,7 +8,7 @@ variable "create" { variable "ami_type" { description = "Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values" type = string - default = "AL2023_x86_64_STANDARD" + default = "AL2023_X86_64_STANDARD" nullable = false } diff --git a/modules/eks-managed-node-group/README.md b/modules/eks-managed-node-group/README.md index f2744c45f3..4017008e63 100644 --- a/modules/eks-managed-node-group/README.md +++ b/modules/eks-managed-node-group/README.md @@ -108,7 +108,7 @@ module "eks_managed_node_group" { | [account\_id](#input\_account\_id) | The AWS account ID - pass through value to reduce number of GET requests from data sources | `string` | `""` | no | | [ami\_id](#input\_ami\_id) | The AMI from which to launch the instance. If not supplied, EKS will use its own default image | `string` | `""` | no | | [ami\_release\_version](#input\_ami\_release\_version) | The AMI version. Defaults to latest AMI release version for the given Kubernetes version and AMI type | `string` | `null` | no | -| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_x86_64_STANDARD"` | no | +| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_X86_64_STANDARD"` | no | | [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI |
map(object({
device_name = optional(string)
ebs = optional(object({
delete_on_termination = optional(bool)
encrypted = optional(bool)
iops = optional(number)
kms_key_id = optional(string)
snapshot_id = optional(string)
throughput = optional(number)
volume_initialization_rate = optional(number)
volume_size = optional(number)
volume_type = optional(string)
}))
no_device = optional(string)
virtual_name = optional(string)
}))
| `null` | no | | [bootstrap\_extra\_args](#input\_bootstrap\_extra\_args) | Additional arguments passed to the bootstrap script. When `ami_type` = `BOTTLEROCKET_*`; these are additional [settings](https://github.com/bottlerocket-os/bottlerocket#settings) that are provided to the Bottlerocket user data | `string` | `null` | no | | [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Targeting for EC2 capacity reservations |
object({
capacity_reservation_preference = optional(string)
capacity_reservation_target = optional(object({
capacity_reservation_id = optional(string)
capacity_reservation_resource_group_arn = optional(string)
}))
})
| `null` | no | diff --git a/modules/eks-managed-node-group/main.tf b/modules/eks-managed-node-group/main.tf index fa940c51a9..7733ebc7b6 100644 --- a/modules/eks-managed-node-group/main.tf +++ b/modules/eks-managed-node-group/main.tf @@ -8,6 +8,7 @@ data "aws_caller_identity" "current" { locals { partition = try(data.aws_partition.current[0].partition, var.partition) account_id = try(data.aws_caller_identity.current[0].account_id, var.account_id) + ami_type = upper(var.ami_type) } ################################################################################ @@ -18,7 +19,7 @@ module "user_data" { source = "../_user_data" create = var.create - ami_type = var.ami_type + ami_type = local.ami_type cluster_name = var.cluster_name cluster_endpoint = var.cluster_endpoint @@ -395,28 +396,28 @@ data "aws_eks_cluster_versions" "this" { locals { # Just to ensure templating doesn't fail when values are not provided ssm_kubernetes_version = var.kubernetes_version != null ? var.kubernetes_version : try(data.aws_eks_cluster_versions.this[0].cluster_versions[0].cluster_version, "UNSPECIFIED") - ssm_ami_type = var.ami_type != null ? var.ami_type : "" + ssm_ami_type = local.ami_type != null ? local.ami_type : "" # Map the AMI type to the respective SSM param path ssm_ami_type_to_ssm_param = { - AL2_x86_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2/recommended/release_version" - AL2_x86_64_GPU = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-gpu/recommended/release_version" + AL2_X86_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2/recommended/release_version" + AL2_X86_64_GPU = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-gpu/recommended/release_version" AL2_ARM_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-arm64/recommended/release_version" CUSTOM = "NONE" BOTTLEROCKET_ARM_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/arm64/latest/image_version" - BOTTLEROCKET_x86_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/x86_64/latest/image_version" + BOTTLEROCKET_X86_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/x86_64/latest/image_version" BOTTLEROCKET_ARM_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/arm64/latest/image_version" - BOTTLEROCKET_x86_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/x86_64/latest/image_version" + BOTTLEROCKET_X86_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/x86_64/latest/image_version" BOTTLEROCKET_ARM_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/arm64/latest/image_version" - BOTTLEROCKET_x86_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/x86_64/latest/image_version" - WINDOWS_CORE_2019_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}" - WINDOWS_FULL_2019_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}" - WINDOWS_CORE_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}" - WINDOWS_FULL_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}" - AL2023_x86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/standard/recommended/release_version" + BOTTLEROCKET_X86_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/x86_64/latest/image_version" + WINDOWS_CORE_2019_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}" + WINDOWS_FULL_2019_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}" + WINDOWS_CORE_2022_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}" + WINDOWS_FULL_2022_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}" + AL2023_X86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/standard/recommended/release_version" AL2023_ARM_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/arm64/standard/recommended/release_version" - AL2023_x86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/neuron/recommended/release_version" - AL2023_x86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/nvidia/recommended/release_version" + AL2023_X86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/neuron/recommended/release_version" + AL2023_X86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/nvidia/recommended/release_version" AL2023_ARM_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/arm64/nvidia/recommended/release_version" } @@ -431,7 +432,7 @@ data "aws_ssm_parameter" "ami" { region = var.region - name = local.ssm_ami_type_to_ssm_param[var.ami_type] + name = local.ssm_ami_type_to_ssm_param[local.ami_type] } ################################################################################ @@ -465,7 +466,7 @@ resource "aws_eks_node_group" "this" { node_group_name_prefix = var.use_name_prefix ? "${var.name}-" : null # https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-custom-ami - ami_type = var.ami_id != "" ? null : var.ami_type + ami_type = var.ami_id != "" ? null : local.ami_type release_version = var.ami_id != "" ? null : var.use_latest_ami_release_version ? local.latest_ami_release_version : var.ami_release_version version = var.ami_id != "" ? null : var.kubernetes_version diff --git a/modules/eks-managed-node-group/variables.tf b/modules/eks-managed-node-group/variables.tf index 84bb8421d2..4fe0206f59 100644 --- a/modules/eks-managed-node-group/variables.tf +++ b/modules/eks-managed-node-group/variables.tf @@ -481,7 +481,7 @@ variable "use_name_prefix" { variable "ami_type" { description = "Type of Amazon Machine Image (AMI) associated with the EKS Node Group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values" type = string - default = "AL2023_x86_64_STANDARD" + default = "AL2023_X86_64_STANDARD" nullable = false } diff --git a/modules/self-managed-node-group/README.md b/modules/self-managed-node-group/README.md index 04ad2e61c2..f13b772d3a 100644 --- a/modules/self-managed-node-group/README.md +++ b/modules/self-managed-node-group/README.md @@ -88,7 +88,7 @@ module "self_managed_node_group" { | [account\_id](#input\_account\_id) | The AWS account ID - pass through value to reduce number of GET requests from data sources | `string` | `""` | no | | [additional\_cluster\_dns\_ips](#input\_additional\_cluster\_dns\_ips) | Additional DNS IP addresses to use for the cluster. Only used when `ami_type` = `BOTTLEROCKET_*` | `list(string)` | `null` | no | | [ami\_id](#input\_ami\_id) | The AMI from which to launch the instance | `string` | `""` | no | -| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the node group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_x86_64_STANDARD"` | no | +| [ami\_type](#input\_ami\_type) | Type of Amazon Machine Image (AMI) associated with the node group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values | `string` | `"AL2023_X86_64_STANDARD"` | no | | [autoscaling\_group\_tags](#input\_autoscaling\_group\_tags) | A map of additional tags to add to the autoscaling group created. Tags are applied to the autoscaling group only and are NOT propagated to instances | `map(string)` | `{}` | no | | [availability\_zones](#input\_availability\_zones) | A list of one or more availability zones for the group. Used for EC2-Classic and default subnets when not specified with `subnet_ids` argument. Conflicts with `subnet_ids` | `list(string)` | `null` | no | | [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI |
map(object({
device_name = optional(string)
ebs = optional(object({
delete_on_termination = optional(bool)
encrypted = optional(bool)
iops = optional(number)
kms_key_id = optional(string)
snapshot_id = optional(string)
throughput = optional(number)
volume_initialization_rate = optional(number)
volume_size = optional(number)
volume_type = optional(string)
}))
no_device = optional(string)
virtual_name = optional(string)
}))
| `null` | no | diff --git a/modules/self-managed-node-group/main.tf b/modules/self-managed-node-group/main.tf index 8a65dc6a66..98688f33f0 100644 --- a/modules/self-managed-node-group/main.tf +++ b/modules/self-managed-node-group/main.tf @@ -8,6 +8,7 @@ data "aws_caller_identity" "current" { locals { partition = try(data.aws_partition.current[0].partition, var.partition) account_id = try(data.aws_caller_identity.current[0].account_id, var.account_id) + ami_type = upper(var.ami_type) } ################################################################################ @@ -20,23 +21,23 @@ locals { # Map the AMI type to the respective SSM param path ami_type_to_ssm_param = { - AL2_x86_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2/recommended/image_id" - AL2_x86_64_GPU = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-gpu/recommended/image_id" + AL2_X86_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2/recommended/image_id" + AL2_X86_64_GPU = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-gpu/recommended/image_id" AL2_ARM_64 = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2-arm64/recommended/image_id" BOTTLEROCKET_ARM_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/arm64/latest/image_id" - BOTTLEROCKET_x86_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/x86_64/latest/image_id" + BOTTLEROCKET_X86_64 = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}/x86_64/latest/image_id" BOTTLEROCKET_ARM_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/arm64/latest/image_id" - BOTTLEROCKET_x86_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/x86_64/latest/image_id" + BOTTLEROCKET_X86_64_FIPS = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-fips/x86_64/latest/image_id" BOTTLEROCKET_ARM_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/arm64/latest/image_id" - BOTTLEROCKET_x86_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/x86_64/latest/image_id" - WINDOWS_CORE_2019_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" - WINDOWS_FULL_2019_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" - WINDOWS_CORE_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" - WINDOWS_FULL_2022_x86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" - AL2023_x86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/standard/recommended/image_id" + BOTTLEROCKET_X86_64_NVIDIA = "/aws/service/bottlerocket/aws-k8s-${local.ssm_kubernetes_version}-nvidia/x86_64/latest/image_id" + WINDOWS_CORE_2019_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" + WINDOWS_FULL_2019_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2019-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" + WINDOWS_CORE_2022_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Full-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" + WINDOWS_FULL_2022_X86_64 = "/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-EKS_Optimized-${local.ssm_kubernetes_version}/image_id" + AL2023_X86_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/standard/recommended/image_id" AL2023_ARM_64_STANDARD = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/arm64/standard/recommended/image_id" - AL2023_x86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/neuron/recommended/image_id" - AL2023_x86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/nvidia/recommended/image_id" + AL2023_X86_64_NEURON = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/neuron/recommended/image_id" + AL2023_X86_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/x86_64/nvidia/recommended/image_id" AL2023_ARM_64_NVIDIA = "/aws/service/eks/optimized-ami/${local.ssm_kubernetes_version}/amazon-linux-2023/arm64/nvidia/recommended/image_id" } } @@ -46,7 +47,7 @@ data "aws_ssm_parameter" "ami" { region = var.region - name = local.ami_type_to_ssm_param[var.ami_type] + name = local.ami_type_to_ssm_param[local.ami_type] } ################################################################################ @@ -57,7 +58,7 @@ module "user_data" { source = "../_user_data" create = var.create - ami_type = var.ami_type + ami_type = local.ami_type is_eks_managed_node_group = false cluster_name = var.cluster_name @@ -977,7 +978,7 @@ resource "aws_eks_access_entry" "this" { cluster_name = var.cluster_name principal_arn = var.create_iam_instance_profile ? aws_iam_role.this[0].arn : var.iam_role_arn - type = startswith(var.ami_type, "WINDOWS_") ? "EC2_WINDOWS" : "EC2_LINUX" + type = startswith(local.ami_type, "WINDOWS_") ? "EC2_WINDOWS" : "EC2_LINUX" tags = var.tags } diff --git a/modules/self-managed-node-group/variables.tf b/modules/self-managed-node-group/variables.tf index 6e42508c68..7d57b7132f 100644 --- a/modules/self-managed-node-group/variables.tf +++ b/modules/self-managed-node-group/variables.tf @@ -364,7 +364,7 @@ variable "ami_id" { variable "ami_type" { description = "Type of Amazon Machine Image (AMI) associated with the node group. See the [AWS documentation](https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html#AmazonEKS-Type-Nodegroup-amiType) for valid values" type = string - default = "AL2023_x86_64_STANDARD" + default = "AL2023_X86_64_STANDARD" nullable = false } diff --git a/tests/eks-managed-node-group/main.tf b/tests/eks-managed-node-group/main.tf index c09bde0a3b..411fffdc29 100644 --- a/tests/eks-managed-node-group/main.tf +++ b/tests/eks-managed-node-group/main.tf @@ -112,7 +112,7 @@ module "eks" { # AL2023 node group utilizing new user data format which utilizes nodeadm # to join nodes to the cluster (instead of /etc/eks/bootstrap.sh) al2023_nodeadm = { - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" use_latest_ami_release_version = true cloudinit_pre_nodeadm = [ @@ -137,12 +137,12 @@ module "eks" { # so we need to disable it to use the default template provided by the AWS EKS managed node group service use_custom_launch_template = false - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" } # Adds to the AWS provided user data bottlerocket_add = { - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" use_latest_ami_release_version = true @@ -158,7 +158,7 @@ module "eks" { bottlerocket_custom = { # Current bottlerocket AMI ami_id = data.aws_ami.eks_default_bottlerocket.image_id - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" # Use module user data template to bootstrap enable_bootstrap_user_data = true @@ -320,7 +320,7 @@ module "eks" { efa = { # The EKS AL2023 NVIDIA AMI provides all of the necessary components # for accelerated workloads w/ EFA - ami_type = "AL2023_x86_64_NVIDIA" + ami_type = "AL2023_X86_64_NVIDIA" instance_types = ["p4d.24xlarge"] # Setting to zero so all resources are created *EXCEPT the EC2 instances @@ -438,7 +438,7 @@ module "eks_managed_node_group" { cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id vpc_security_group_ids = [module.eks.node_security_group_id] - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" # this will get added to what AWS provides bootstrap_extra_args = <<-EOT diff --git a/tests/self-managed-node-group/main.tf b/tests/self-managed-node-group/main.tf index 50611d4b3d..671e75acee 100644 --- a/tests/self-managed-node-group/main.tf +++ b/tests/self-managed-node-group/main.tf @@ -75,7 +75,7 @@ module "eks" { self_managed_node_groups = { # Default node group - as provisioned by the module defaults default_node_group = { - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" ami_id = data.aws_ami.eks_default.image_id # enable discovery of autoscaling groups by cluster-autoscaler @@ -89,7 +89,7 @@ module "eks" { bottlerocket = { name = "bottlerocket-self-mng" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" ami_id = data.aws_ami.eks_default_bottlerocket.id instance_type = "m5.large" desired_size = 2 @@ -311,7 +311,7 @@ module "eks" { efa = { # The EKS AL2023 NVIDIA AMI provides all of the necessary components # for accelerated workloads w/ EFA - ami_type = "AL2023_x86_64_NVIDIA" + ami_type = "AL2023_X86_64_NVIDIA" instance_types = ["p4d.24xlarge"] # Setting to zero so all resources are created *EXCEPT the EC2 instances diff --git a/tests/user-data/main.tf b/tests/user-data/main.tf index 835d9fc347..b43e64f4f9 100644 --- a/tests/user-data/main.tf +++ b/tests/user-data/main.tf @@ -15,7 +15,7 @@ locals { module "eks_mng_al2_disabled" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" create = false } @@ -23,7 +23,7 @@ module "eks_mng_al2_no_op" { source = "../../modules/_user_data" # Hard requirement - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_service_cidr = local.cluster_service_cidr } @@ -31,7 +31,7 @@ module "eks_mng_al2_additional" { source = "../../modules/_user_data" # Hard requirement - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_service_cidr = local.cluster_service_cidr pre_bootstrap_user_data = <<-EOT @@ -42,7 +42,7 @@ module "eks_mng_al2_additional" { module "eks_mng_al2_custom_ami" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint cluster_auth_base64 = local.cluster_auth_base64 @@ -64,7 +64,7 @@ module "eks_mng_al2_custom_ami" { module "eks_mng_al2_custom_ami_ipv6" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint cluster_auth_base64 = local.cluster_auth_base64 @@ -87,7 +87,7 @@ module "eks_mng_al2_custom_ami_ipv6" { module "eks_mng_al2_custom_template" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint cluster_auth_base64 = local.cluster_auth_base64 @@ -114,7 +114,7 @@ module "eks_mng_al2_custom_template" { module "eks_mng_al2023_no_op" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" # Hard requirement cluster_service_cidr = local.cluster_service_cidr @@ -123,7 +123,7 @@ module "eks_mng_al2023_no_op" { module "eks_mng_al2023_additional" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" # Hard requirement cluster_service_cidr = local.cluster_service_cidr @@ -147,7 +147,7 @@ module "eks_mng_al2023_additional" { module "eks_mng_al2023_custom_ami" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -182,7 +182,7 @@ module "eks_mng_al2023_custom_ami" { module "eks_mng_al2023_custom_template" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -222,7 +222,7 @@ module "eks_mng_al2023_custom_template" { module "eks_mng_bottlerocket_no_op" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" # Hard requirement cluster_service_cidr = local.cluster_service_cidr @@ -231,7 +231,7 @@ module "eks_mng_bottlerocket_no_op" { module "eks_mng_bottlerocket_additional" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" cluster_service_cidr = local.cluster_service_cidr bootstrap_extra_args = <<-EOT @@ -244,7 +244,7 @@ module "eks_mng_bottlerocket_additional" { module "eks_mng_bottlerocket_custom_ami" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -266,7 +266,7 @@ module "eks_mng_bottlerocket_custom_ami" { module "eks_mng_bottlerocket_custom_template" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -290,7 +290,7 @@ module "eks_mng_bottlerocket_custom_template" { module "eks_mng_windows_no_op" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" # Hard requirement cluster_service_cidr = local.cluster_service_cidr @@ -299,7 +299,7 @@ module "eks_mng_windows_no_op" { module "eks_mng_windows_additional" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" # Hard requirement cluster_service_cidr = local.cluster_service_cidr @@ -312,7 +312,7 @@ module "eks_mng_windows_additional" { module "eks_mng_windows_custom_ami" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -336,7 +336,7 @@ module "eks_mng_windows_custom_ami" { module "eks_mng_windows_custom_template" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" cluster_name = local.name cluster_endpoint = local.cluster_endpoint @@ -370,14 +370,14 @@ module "self_mng_al2_no_op" { is_eks_managed_node_group = false # Hard requirement - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" cluster_service_cidr = local.cluster_service_cidr } module "self_mng_al2_bootstrap" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -402,7 +402,7 @@ module "self_mng_al2_bootstrap" { module "self_mng_al2_bootstrap_ipv6" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -428,7 +428,7 @@ module "self_mng_al2_bootstrap_ipv6" { module "self_mng_al2_custom_template" { source = "../../modules/_user_data" - ami_type = "AL2_x86_64" + ami_type = "AL2_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -459,7 +459,7 @@ module "self_mng_al2_custom_template" { module "self_mng_al2023_no_op" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" is_eks_managed_node_group = false @@ -470,7 +470,7 @@ module "self_mng_al2023_no_op" { module "self_mng_al2023_bootstrap" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -506,7 +506,7 @@ module "self_mng_al2023_bootstrap" { module "self_mng_al2023_custom_template" { source = "../../modules/_user_data" - ami_type = "AL2023_x86_64_STANDARD" + ami_type = "AL2023_X86_64_STANDARD" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -548,7 +548,7 @@ module "self_mng_al2023_custom_template" { module "self_mng_bottlerocket_no_op" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" is_eks_managed_node_group = false @@ -559,7 +559,7 @@ module "self_mng_bottlerocket_no_op" { module "self_mng_bottlerocket_bootstrap" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -581,7 +581,7 @@ module "self_mng_bottlerocket_bootstrap" { module "self_mng_bottlerocket_custom_template" { source = "../../modules/_user_data" - ami_type = "BOTTLEROCKET_x86_64" + ami_type = "BOTTLEROCKET_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -609,7 +609,7 @@ module "self_mng_bottlerocket_custom_template" { module "self_mng_windows_no_op" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" is_eks_managed_node_group = false @@ -620,7 +620,7 @@ module "self_mng_windows_no_op" { module "self_mng_windows_bootstrap" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false @@ -646,7 +646,7 @@ module "self_mng_windows_bootstrap" { module "self_mng_windows_custom_template" { source = "../../modules/_user_data" - ami_type = "WINDOWS_CORE_2022_x86_64" + ami_type = "WINDOWS_CORE_2022_X86_64" enable_bootstrap_user_data = true is_eks_managed_node_group = false