From 7641bf5be033fb8104424172a6f9bfa8419ab1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Mon, 13 Jan 2025 08:18:24 +0100 Subject: [PATCH 1/2] Use latest Terraform provider for Leaseweb --- leaseweb/server/installation/versions.tf | 2 +- op/host/leaseweb/versions.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/leaseweb/server/installation/versions.tf b/leaseweb/server/installation/versions.tf index ffea66f..185bbac 100644 --- a/leaseweb/server/installation/versions.tf +++ b/leaseweb/server/installation/versions.tf @@ -3,7 +3,7 @@ terraform { # https://registry.terraform.io/providers/LeaseWeb/leaseweb/latest leaseweb = { source = "LeaseWeb/leaseweb" - version = "~> 0.4" + version = "~> 1.20" } } } diff --git a/op/host/leaseweb/versions.tf b/op/host/leaseweb/versions.tf index e8c9af9..86d707b 100644 --- a/op/host/leaseweb/versions.tf +++ b/op/host/leaseweb/versions.tf @@ -8,7 +8,7 @@ terraform { # https://registry.terraform.io/providers/LeaseWeb/leaseweb/latest leaseweb = { source = "LeaseWeb/leaseweb" - version = "~> 0.4" + version = "~> 1.20" } } } From 28c7aabd48463bae3f2176047865cf82ffe1d00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Mon, 13 Jan 2025 08:42:18 +0100 Subject: [PATCH 2/2] Refactor partition definition for new Leaseweb provider --- leaseweb/server/installation/main.tf | 40 +++++++++++++--------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/leaseweb/server/installation/main.tf b/leaseweb/server/installation/main.tf index 9deef0e..c06366e 100644 --- a/leaseweb/server/installation/main.tf +++ b/leaseweb/server/installation/main.tf @@ -75,7 +75,7 @@ EOR reboot EOT - raid { + raid = { type = var.raid_type level = 1 number_of_disks = 2 @@ -83,27 +83,23 @@ EOT device = var.device - partition { - mountpoint = "/boot" - filesystem = "ext2" - size = 1024 - } - - partition { - mountpoint = "/" - filesystem = "ext4" - size = 20480 - } - - partition { - mountpoint = "/data" - filesystem = "ext4" - size = "*" - } - - timeouts { - create = "60m" - } + partitions = [ + { + mountpoint = "/boot" + filesystem = "ext2" + size = 1024 + }, + { + mountpoint = "/" + filesystem = "ext4" + size = 20480 + }, + { + mountpoint = "/data" + filesystem = "ext4" + size = "*" + } + ] lifecycle { prevent_destroy = true