fix: add ssh key resource (#80)

This commit is contained in:
Rasmus Wejlgaard 2026-04-26 20:08:45 +01:00 committed by GitHub
parent 19928358c5
commit d76be4828c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 29 deletions

View file

@ -1,39 +1,40 @@
resource "hcloud_server" "nuremberg-a" { resource "hcloud_server" "nuremberg-a" {
name = "nuremberg-a" name = "nuremberg-a"
image = "debian-13" image = "debian-13"
server_type = "cx23" server_type = "cx23"
location = "nbg1" location = "nbg1"
delete_protection = true delete_protection = true
rebuild_protection = true rebuild_protection = true
keep_disk = true keep_disk = true
labels = { labels = {
"role" = "mail" "role" = "mail"
} }
public_net { public_net {
ipv4_enabled = true ipv4_enabled = true
ipv6_enabled = true ipv6_enabled = true
} }
} }
resource "hcloud_server" "helsinki-a" { resource "hcloud_server" "helsinki-a" {
name = "helsinki-a" name = "helsinki-a"
image = "debian-13" image = "debian-13"
server_type = "cax11" server_type = "cax11"
location = "hel1" location = "hel1"
delete_protection = true delete_protection = true
rebuild_protection = true rebuild_protection = true
keep_disk = true keep_disk = true
labels = { labels = {
"role" = "ingress" "role" = "ingress"
} }
public_net { public_net {
ipv4_enabled = true ipv4_enabled = true
ipv6_enabled = true ipv6_enabled = true
} }
} }

View file

@ -0,0 +1,4 @@
resource "hcloud_ssh_key" "personal" {
name = "personal"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDlU2h+JgVMVsHkkcxed9WbrUCKWfuUrY6yErmGIIREP6X2cua2qE4H+329FSJXQs0Yd0OiNwsXzfW88kl0+aMopQXaccY3q8109KR43RNrRrril9od+PidVvT/fvV8eNYVE9M4gyT1c9t8ZLD85vJf9rILFWbLG4DqqFL3z33W2u//Bl8uVLoY3tSgBmukVt45If9g9mxVfSstLmZj7j75rghS0EbE2kzwgUH397mJGMlJJdFhzRtP+/D09hE+zgFxl45V6dszEu9ggawRRGvEcR1dXDB0g6n3/7h6M+pb8/77ZAxk4AwD6CzZi8k7SlVkzCKZQRPpge+C0xLdm9EAY7byj30XdGgpo80eiCJmVImYm4VmPnjh39IumQWkDgpXkYQ9aj9jUDvcSrEmwTBRJOqmaO7BW0sVbP0BDW3UjCyeUQ8zprmWsUscoB0u9r4bMOLnhNldXljjKcDRdX2JciIILiCEfnn781Q3uxLgOoHEnYto0tSxbLQI/o9WB4M="
}

View file

@ -4,6 +4,7 @@ terraform {
required_providers { required_providers {
cloudflare = { cloudflare = {
source = "cloudflare/cloudflare" source = "cloudflare/cloudflare"
version = "~> 5.19"
} }
hcloud = { hcloud = {