Support bottlerocket ami types @nitrocode (#93)
what
- Support bottlerocket ami types
- Removed unused null and template providers
why
- This will allow us to support bottlerocket ami using an ami_type
- template provider removal will allow OSX M1 to use this module
references
https://docs.aws.amazon.com/eks/latest/APIReference/API_Nodegroup.html
amiType
If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.
Type: String
Valid Values: AL2_x86_64 | AL2_x86_64_GPU | AL2_ARM_64 | CUSTOM | BOTTLEROCKET_ARM_64 | BOTTLEROCKET_x86_64
Required: No
notes
- There is no GPU version of bottlerocket
Here are the following data source checks to verify backwards compatibility.
With a temporary output in ami.tf
and examples/complete/outputs.tf
output "ami_regex" {
value = local.ami_regex[local.ami_kind],
}
And setting after_cluster_joining_userdata = ["ls"]
to trigger needing an ami.
ami_type = "AL2_x86_64"
and ami_release_version = ["1.21.0-20211013"]
# matches amazon-eks-node-1.21-v20211013 in us-east-2
ami_regex = amazon-eks-node-1.21-v20211013
ami_type = "AL2_x86_64"
and no ami_release_version
# matches amazon-eks-node-1.21-v20211013 in us-east-2
ami_regex = amazon-eks-node-1.21-*
ami_type = "BOTTLEROCKET_x86_64"
and ami_release_version = ["1.2.0-ccf1b754"]
# matches bottlerocket-aws-k8s-1.21-x86_64-v1.2.0-ccf1b754 in us-east-2
ami_regex = bottlerocket-aws-k8s-1.21-x86_64-v1.2.0-ccf1b754
ami_type = "BOTTLEROCKET_x86_64"
and no ami_release_version
# matches bottlerocket-aws-k8s-1.21-x86_64-v1.3.0-395b459c in us-east-2
ami_regex = bottlerocket-aws-k8s-1.21-x86_64-*
ami_type = "BOTTLEROCKET_ARM_64"
and ami_release_version = ["1.2.0-ccf1b754"]
# matches bottlerocket-aws-k8s-1.21-aarch64-v1.2.0-ccf1b754 in us-east-2
ami_regex = "bottlerocket-aws-k8s-1.21-aarch64-v1.2.0-ccf1b754"
ami_type = "BOTTLEROCKET_ARM_64"
and no ami_release_version
# matches bottlerocket-aws-k8s-1.21-aarch64-v1.3.0-395b459c in us-east-2
ami_regex = "bottlerocket-aws-k8s-1.21-aarch64-*"