jenkins-x / terraform-aws-eks-jx

A Terraform module for creating Jenkins X infrastructure on AWS
Apache License 2.0
63 stars 42 forks source link

Rename the input value allowed_spot_instance_types to allowed_instance_types #307

Open babadofar opened 3 years ago

babadofar commented 3 years ago

Summary

the value for allowed_spot_instance_types is used for regular instance types and really has nothing to do with spot instances. Should be renamed to allowed_instance_types

Also, in the documentation:


allowed_spot_instance_types | Allowed machine types for spot instances (must be same size) | any
-- | -- | --

But in the code at https://github.com/jenkins-x/terraform-aws-eks-jx/blob/e342b9db96796e4e1fcad0be0e58d1e6cc81f687/modules/cluster/main.tf#L81:

ankitm123 commented 2 years ago

override_instance_types is used to specify spot instance types in the eks module we use internally. See https://github.com/terraform-aws-modules/terraform-aws-eks/blob/926af35595d1e8747d6a41f8de445316400fbbc8/workers_launch_template.tf#L163

Also an example can be found here: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/a26c9fd0c9c880d5b99c438ad620e91dda957e10/docs/spot-instances.md#using-launch-templates

babadofar commented 2 years ago

It is also used for regular instance types, not only spot?

ankitm123 commented 2 years ago

It should not be I think, if it is, it could be a bug in the eks module we use.