~xenrox/ansible

42804977e8b2ea00dc93b9875f357680f25a9710 — Thorben Günther 2 months ago a3f051d
hetzner: Add cloud server
2 files changed, 22 insertions(+), 0 deletions(-)

A terraform_hetzner/cloud.tf
M terraform_hetzner/versions.tf
A terraform_hetzner/cloud.tf => terraform_hetzner/cloud.tf +19 -0
@@ 0,0 1,19 @@
provider "hcloud" {
  token = data.vault_generic_secret.hetzner.data["cloud_key"]
}

resource "hcloud_ssh_key" "yubikey" {
  name       = "Yubikey"
  public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCYPr8UYQrHDIwr5VBiHBgWm4ImYQxdz5xCnScwpX0QVP0HtlTFjrkNg2KkpQ7WbMiQnztiQlhtAO75sa4yn2ZvBT+WmZhC0YGbpB/4NmYVLrv5Mibwe8KIvYyapvaUTshfVGQlC73U3qfYi0WV0S99NO6owgQ/6nXZMwiQi/DQ+S+fIqDaAp7jxBKAT7l31HYCHme0x7AavnFzKNGLYVhM2yzyfH4EUeTqXVF5089wX7Cqc/4ZOiQtfK5hLEdjN8egNoDjwMlRSR8xOBcdOqqJcUglspDcBuI166X5ItkPg0JYVIOaIx49B75ziJ6xo92gOHnFfxJ0JHCItEH6o8eb9Yp8oYvjJvi/Wq1zaABXLtJ/PcypQRUHj56nqEGU0hOj7G6bdMvbYK+IvdXX36ycl/289ry0DG72YQHa8zGnmXM/lJGaqhPYwg0nnbxjf5U14sByxjdDlIKVhItIqsKJ8L87beDi8d42HQT3VobOB1REKJjB0r1U0Vz1nmZpFA9gIijhPKE9b+9TpkJ+svHals/sl3axjXkFLPSyghScKGVN9hzo5edqZ471zKSUwOGhaI2ImmlTUg8yihzYMeNdnNIjs7mvenH5W6sZYJnN4OjxSOuQBkCS5jkztG3WvUnBclHswlvWKciFmYCJ1CcyGdeOh/Ywk78PbVjGloJJ1w=="
}

resource "hcloud_server" "fenrir" {
  name        = "fenrir"
  server_type = "cx11"
  location    = "nbg1"
  image       = "debian-10"

  lifecycle {
    ignore_changes = [image]
  }
}

M terraform_hetzner/versions.tf => terraform_hetzner/versions.tf +3 -0
@@ 1,5 1,8 @@
terraform {
  required_providers {
    hcloud = {
      source = "hetznercloud/hcloud"
    }
    hetznerdns = {
      source = "timohirt/hetznerdns"
    }