From e083f4da7a86ad81d1b51d37bdfcf15642812dd8 Mon Sep 17 00:00:00 2001 From: vincent Date: Sat, 3 Feb 2024 09:53:40 +0100 Subject: [PATCH] terraform: remove corwin --- terraform/cloud/output.tf | 4 ++-- terraform/cloud/server.tf | 23 +---------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/terraform/cloud/output.tf b/terraform/cloud/output.tf index fea008b..535a7cc 100644 --- a/terraform/cloud/output.tf +++ b/terraform/cloud/output.tf @@ -1,13 +1,13 @@ output "homelab_servers_status" { value = { - for server in hcloud_server.HomeLab2 : + for server in hcloud_server.merlin : server.name => server.status } } output "homelab_servers_ips" { value = { - for server in hcloud_server.HomeLab2 : + for server in hcloud_server.merlin : server.name => server.ipv4_address } } diff --git a/terraform/cloud/server.tf b/terraform/cloud/server.tf index e92b0ae..d9dac14 100644 --- a/terraform/cloud/server.tf +++ b/terraform/cloud/server.tf @@ -1,25 +1,3 @@ -resource "hcloud_server" "HomeLab2" { - count = var.instances - name = "corwin" - image = var.os_type - server_type = var.server_type - location = var.location - ssh_keys = [hcloud_ssh_key.default.id] - firewall_ids = [ - hcloud_firewall.prod.id, - hcloud_firewall.Gitea_SSH.id, - hcloud_firewall.torrent.id, - hcloud_firewall.mail.id, - ] - labels = { - } - - lifecycle { - ignore_changes = [ - ssh_keys, - ] - } -} data "hcloud_image" "arch" { with_selector = "os-flavor=archlinux" @@ -48,6 +26,7 @@ resource "hcloud_server" "merlin" { lifecycle { ignore_changes = [ ssh_keys, + image, ] } }