aboutsummaryrefslogtreecommitdiff
path: root/terraform/aws/mini_environment/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/aws/mini_environment/main.tf')
-rw-r--r--terraform/aws/mini_environment/main.tf14
1 files changed, 10 insertions, 4 deletions
diff --git a/terraform/aws/mini_environment/main.tf b/terraform/aws/mini_environment/main.tf
index b69f8f5..afeda8d 100644
--- a/terraform/aws/mini_environment/main.tf
+++ b/terraform/aws/mini_environment/main.tf
@@ -30,6 +30,10 @@ variable "backend_remote_state_address" {
type = "string"
}
+variable "ssh_private_key" {
+ type = "string"
+}
+
provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
@@ -79,8 +83,9 @@ resource "aws_spot_instance_request" "main" {
destination = "/home/ubuntu/govuk.service"
connection {
- type = "ssh"
- user = "ubuntu"
+ type = "ssh"
+ user = "ubuntu"
+ private_key = "${var.ssh_private_key}"
}
}
@@ -109,8 +114,9 @@ resource "aws_spot_instance_request" "main" {
]
connection {
- type = "ssh"
- user = "ubuntu"
+ type = "ssh"
+ user = "ubuntu"
+ private_key = "${var.ssh_private_key}"
}
}
}