mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-04-01 15:03:06 +02:00
Fix for "" AMI ID error in PR 115 (#117)
* Fix for "" AMI ID * update changelog
This commit is contained in:
@@ -9,14 +9,13 @@ project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- A useful addition (slam dunk, @self 🔥)
|
|
||||||
- add support for [`amazon-eks-node-*` AMI with bootstrap script](https://aws.amazon.com/blogs/opensource/improvements-eks-worker-node-provisioning/) (by @erks)
|
- add support for [`amazon-eks-node-*` AMI with bootstrap script](https://aws.amazon.com/blogs/opensource/improvements-eks-worker-node-provisioning/) (by @erks)
|
||||||
- expose `kubelet_extra_args` worker group option (replacing `kubelet_node_labels`) to allow specifying arbitrary kubelet options (e.g. taints and labels) (by @erks)
|
- expose `kubelet_extra_args` worker group option (replacing `kubelet_node_labels`) to allow specifying arbitrary kubelet options (e.g. taints and labels) (by @erks)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- A subtle but thoughtful change. (Boomshakalaka, @self 🏀)
|
|
||||||
- allow a custom AMI to be specified as a default (by @erks)
|
- allow a custom AMI to be specified as a default (by @erks)
|
||||||
|
- Bugfix for above change (by @max-rocket-internet)
|
||||||
- **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 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)
|
- **Breaking change** Removed `kubelet_node_labels` worker group option in favor of `kubelet_extra_args`. (by @erks)
|
||||||
|
|
||||||
|
|||||||
2
local.tf
2
local.tf
@@ -10,7 +10,7 @@ locals {
|
|||||||
|
|
||||||
workers_group_defaults_defaults = {
|
workers_group_defaults_defaults = {
|
||||||
name = "count.index" # Name of the worker group. Literal count.index will never be used but if name is not set, the count.index interpolation will be used.
|
name = "count.index" # Name of the worker group. Literal count.index will never be used but if name is not set, the count.index interpolation will be used.
|
||||||
ami_id = "" # AMI ID for the eks workers. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI.
|
ami_id = "${data.aws_ami.eks_worker.id}" # AMI ID for the eks workers. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI.
|
||||||
asg_desired_capacity = "1" # Desired worker capacity in the autoscaling group.
|
asg_desired_capacity = "1" # Desired worker capacity in the autoscaling group.
|
||||||
asg_max_size = "3" # Maximum worker capacity in the autoscaling group.
|
asg_max_size = "3" # Maximum worker capacity in the autoscaling group.
|
||||||
asg_min_size = "1" # Minimum worker capacity in the autoscaling group.
|
asg_min_size = "1" # Minimum worker capacity in the autoscaling group.
|
||||||
|
|||||||
@@ -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"))}"
|
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}"]
|
security_groups = ["${local.worker_security_group_id}"]
|
||||||
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
|
iam_instance_profile = "${aws_iam_instance_profile.workers.id}"
|
||||||
image_id = "${lookup(var.worker_groups[count.index], "ami_id", lookup(local.workers_group_defaults, "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"))}"
|
||||||
instance_type = "${lookup(var.worker_groups[count.index], "instance_type", lookup(local.workers_group_defaults, "instance_type"))}"
|
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"))}"
|
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))}"
|
user_data_base64 = "${base64encode(element(data.template_file.userdata.*.rendered, count.index))}"
|
||||||
|
|||||||
Reference in New Issue
Block a user