From 59db0cc7a9c4ed82ca0034fea6a4d18412dc7c6b Mon Sep 17 00:00:00 2001 From: gelbkreuz Date: Tue, 7 Aug 2018 13:35:24 -0500 Subject: [PATCH] Update main.tf --- server/main.tf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/main.tf b/server/main.tf index e13c8bd..a5e0eab 100644 --- a/server/main.tf +++ b/server/main.tf @@ -6,9 +6,12 @@ variable "subnet_id" {} variable "vpc_security_group_id" {} variable "identity" {} +variable "public_key" {} +variable "private_key" {} + resource "aws_key_pair" "training" { key_name = "${var.identity}-key" - public_key = "${file("~/.ssh/id_rsa.pub")}" + public_key = "${var.public_key}" } resource "aws_instance" "web" { @@ -29,7 +32,7 @@ resource "aws_instance" "web" { connection { user = "ubuntu" - private_key = "${file("~/.ssh/id_rsa")}" + private_key = "${var.private_key}" } provisioner "file" {