Skip to content

Commit 43c9316

Browse files
Existing ssh keys at hetzner can now be used
1 parent 6e33dcb commit 43c9316

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

servers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "hcloud_server" "github_runner" {
33
name = format("%s-%s-%s-%d", "github-runner", var.hetzner_machine_os, random_uuid.hetzner_machine.result, count.index + 1)
44
server_type = var.hetzner_machine_type
55
image = var.hetzner_machine_os
6-
ssh_keys = [hcloud_ssh_key.admin_ssh_key.id]
6+
ssh_keys = concat([hcloud_ssh_key.admin_ssh_key.id], var.additional_public_key_ids)
77

88
connection {
99
host = self.ipv4_address

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,9 @@ variable "github_authentication_token" {
8585
description = "Defines the authentication personal access token"
8686
type = string
8787
}
88+
89+
variable additional_public_key_ids {
90+
description = "Adds public keys to the server that are already registered at hetzner"
91+
default = []
92+
type = list(string)
93+
}

0 commit comments

Comments
 (0)