Skip to content

Commit 5531776

Browse files
erksmax-rocket-internet
authored andcommitted
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
1 parent 21f43b8 commit 5531776

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
1616
### Changed
1717

1818
- A subtle but thoughtful change. (Boomshakalaka, @self 🏀)
19+
- allow a custom AMI to be specified as a default (by @erks)
1920
- **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)
2021
- **Breaking change** Removed `kubelet_node_labels` worker group option in favor of `kubelet_extra_args`. (by @erks)
2122

workers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "aws_launch_configuration" "workers" {
2626
associate_public_ip_address = "${lookup(var.worker_groups[count.index], "public_ip", lookup(local.workers_group_defaults, "public_ip"))}"
2727
security_groups = ["${local.worker_security_group_id}"]
2828
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
29-
image_id = "${lookup(var.worker_groups[count.index], "ami_id", data.aws_ami.eks_worker.id)}"
29+
image_id = "${lookup(var.worker_groups[count.index], "ami_id", lookup(local.workers_group_defaults, "ami_id", data.aws_ami.eks_worker.id))}"
3030
instance_type = "${lookup(var.worker_groups[count.index], "instance_type", lookup(local.workers_group_defaults, "instance_type"))}"
3131
key_name = "${lookup(var.worker_groups[count.index], "key_name", lookup(local.workers_group_defaults, "key_name"))}"
3232
user_data_base64 = "${base64encode(element(data.template_file.userdata.*.rendered, count.index))}"

0 commit comments

Comments
 (0)