Allow a custom AMI to be specified as a default (#115)

* fallback to the default workers group ami_id before the official one

* add CHANGELOG
This commit is contained in:
Touch Ungboriboonpisal
2018-09-04 03:31:16 -07:00
committed by Max Williams
parent 21f43b8341
commit 5531776e2c
2 changed files with 2 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- A subtle but thoughtful change. (Boomshakalaka, @self 🏀)
- allow a custom AMI to be specified as a default (by @erks)
- **Breaking change** Removed support for `eks-worker-*` AMI. The cluster specifying a custom AMI based off of `eks-worker-*` AMI will have to rebuild the AMI from `amazon-eks-node-*`. (by @erks)
- **Breaking change** Removed `kubelet_node_labels` worker group option in favor of `kubelet_extra_args`. (by @erks)

View File

@@ -26,7 +26,7 @@ resource "aws_launch_configuration" "workers" {
associate_public_ip_address = "${lookup(var.worker_groups[count.index], "public_ip", lookup(local.workers_group_defaults, "public_ip"))}"
security_groups = ["${local.worker_security_group_id}"]
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
image_id = "${lookup(var.worker_groups[count.index], "ami_id", data.aws_ami.eks_worker.id)}"
image_id = "${lookup(var.worker_groups[count.index], "ami_id", lookup(local.workers_group_defaults, "ami_id", data.aws_ami.eks_worker.id))}"
instance_type = "${lookup(var.worker_groups[count.index], "instance_type", lookup(local.workers_group_defaults, "instance_type"))}"
key_name = "${lookup(var.worker_groups[count.index], "key_name", lookup(local.workers_group_defaults, "key_name"))}"
user_data_base64 = "${base64encode(element(data.template_file.userdata.*.rendered, count.index))}"