diff --git a/eks-worker-node.tf b/eks-worker-node.tf index 0754686..4fdbbeb 100755 --- a/eks-worker-node.tf +++ b/eks-worker-node.tf @@ -73,7 +73,7 @@ resource "aws_launch_configuration" "frankfurt-private" { iam_instance_profile = "${aws_iam_instance_profile.frankfurt-node.name}" image_id = "${var.eks-worker-ami}" ## visit https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html instance_type = "${var.worker-node-instance_type}" # use instance variable - key_name = "rancher" + key_name = "${var.ssh_key_pair}" name_prefix = "terraform-eks-frankfurt-private" security_groups = ["${aws_security_group.frankfurt-node.id}"] user_data_base64 = "${base64encode(local.frankfurt-node-private-userdata)}" diff --git a/variables.tf b/variables.tf index 3294ae1..6d09eb8 100644 --- a/variables.tf +++ b/variables.tf @@ -15,6 +15,11 @@ variable "worker-node-instance_type" { description = "enter worker node instance type" } +variable "ssh_key_pair" { + description = "Enter SSH keypair name that already exist in the account" + +} + variable "public_subnets" { type = "list" default = ["10.15.0.0/22", "10.15.4.0/22", "10.15.8.0/22"]