Skip to content

Commit

Permalink
added ssh keypair - input from user
Browse files Browse the repository at this point in the history
  • Loading branch information
tprakash17 committed Jun 27, 2019
1 parent 56c25b5 commit b9fc781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eks-worker-node.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit b9fc781

Please sign in to comment.