terraform-aws-eks-node-group
terraform-aws-eks-node-group copied to clipboard
Support attribute-based instance type selection
Support attribute-based instance type selection when the AWS Terraform provider supports it. See AWS announcement
Ticket to track https://github.com/hashicorp/terraform-provider-aws/issues/21566
Ticket to track https://github.com/hashicorp/terraform-provider-aws/issues/21566
This has been closed/released in in AWS Provider v4.16.0
@jtdoepke cool, thanks for the heads up!
Looks like we can use the instance_requirements block on the launch template to make use of this feature.
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template#instance-requirements
The aws_launch_template resource says if we use instance_requirements then we cannot use instance_type argument.
We do not use instance_type on the launch template but we do use instance_types on the aws_eks_node_group.
https://github.com/cloudposse/terraform-aws-eks-node-group/blob/0d9d6a21a09f82fc5146859e188e7362686243b6/main.tf#L116
https://github.com/cloudposse/terraform-aws-eks-node-group/blob/0d9d6a21a09f82fc5146859e188e7362686243b6/main.tf#L129
@jtdoepke if you want to test this out, please take a look at the draft PR #120