mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-02-24 03:24:50 +01:00
Merge pull request #18 from dreamteam-gg/worker_launch_config_tweaks
Adding configuration for public ip association, name_prefix in worker launch config
This commit is contained in:
@@ -58,6 +58,7 @@ variable "workers_group_defaults" {
|
||||
instance_type = "m4.large" # Size of the workers instances.
|
||||
additional_userdata = "" # userdata to append to the default userdata.
|
||||
ebs_optimized = true # sets whether to use ebs optimization on supported types.
|
||||
public_ip = false # Associate a public ip address with a worker
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ resource "aws_autoscaling_group" "workers" {
|
||||
}
|
||||
|
||||
resource "aws_launch_configuration" "workers" {
|
||||
name = "${var.cluster_name}-${lookup(var.worker_groups[count.index], "name", count.index)}"
|
||||
associate_public_ip_address = true
|
||||
name_prefix = "${var.cluster_name}-${lookup(var.worker_groups[count.index], "name", count.index)}"
|
||||
associate_public_ip_address = "${lookup(var.worker_groups[count.index], "public_ip", lookup(var.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)}"
|
||||
|
||||
Reference in New Issue
Block a user