Commit bc5669dd authored by Chris Merrett's avatar Chris Merrett

Enable optional custom AMI's

parent 06486105
Pipeline #5326 passed with stage
in 16 seconds
variable "ami_id" {
description = "Custom AMI ID for the EKS cluster; defaults to latest Amazon-provided AMI if empty"
default = ""
}
variable "cluster_name" {
description = "Name for the EKS cluster"
}
......
......@@ -2,7 +2,7 @@ resource "aws_launch_configuration" "workers" {
associate_public_ip_address = false
ebs_optimized = "${var.ebs_optimized_workers}"
iam_instance_profile = "${aws_iam_instance_profile.workers.name}"
image_id = "${data.aws_ami.eks_worker.id}"
image_id = "${var.ami_id != "" ? var.ami_id : data.aws_ami.eks_worker.id}"
instance_type = "${var.instance_type}"
name_prefix = "${var.cluster_name}-eks-workers-"
security_groups = ["${aws_security_group.workers.id}"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment