aboutsummaryrefslogtreecommitdiff
path: root/terraform/aws/backend/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'terraform/aws/backend/main.tf')
-rw-r--r--terraform/aws/backend/main.tf19
1 files changed, 13 insertions, 6 deletions
diff --git a/terraform/aws/backend/main.tf b/terraform/aws/backend/main.tf
index 57e9348..346ab0d 100644
--- a/terraform/aws/backend/main.tf
+++ b/terraform/aws/backend/main.tf
@@ -26,6 +26,10 @@ variable "ssh_public_key" {
type = "string"
}
+variable "ssh_private_key" {
+ type = "string"
+}
+
variable "guix_substitute_servers" {
type = "map"
default = {
@@ -237,8 +241,9 @@ resource "aws_spot_instance_request" "main" {
destination = "/home/ubuntu/guix-daemon.service"
connection {
- type = "ssh"
- user = "ubuntu"
+ type = "ssh"
+ user = "ubuntu"
+ private_key = "${var.ssh_private_key}"
}
}
@@ -247,8 +252,9 @@ resource "aws_spot_instance_request" "main" {
destination = "/home/ubuntu/acl"
connection {
- type = "ssh"
- user = "ubuntu"
+ type = "ssh"
+ user = "ubuntu"
+ private_key = "${var.ssh_private_key}"
}
}
@@ -305,8 +311,9 @@ EOF
]
connection {
- type = "ssh"
- user = "ubuntu"
+ type = "ssh"
+ user = "ubuntu"
+ private_key = "${var.ssh_private_key}"
}
}
}