From 977d141821370082af062ed4b57d5d3f1a4946cc Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Thu, 14 Jul 2022 05:00:55 +0200 Subject: [PATCH] Cleanup --- restore-tests/main.tf | 23 ++--------------------- restore-tests/variables.tf | 27 +++++++++++++-------------- restore-tests/versions.tf | 4 ---- 3 files changed, 15 insertions(+), 39 deletions(-) diff --git a/restore-tests/main.tf b/restore-tests/main.tf index 00c011d..b22f594 100644 --- a/restore-tests/main.tf +++ b/restore-tests/main.tf @@ -20,10 +20,10 @@ resource "local_sensitive_file" "ssh_private_key" { } resource "hcloud_server" "under_test" { - name = var.hcloud_server_name + name = var.hcloud_server_under_test_name labels = { "os" = "coreos" } - server_type = "cx31" + server_type = var.hcloud_server_under_test_type datacenter = var.hcloud_server_datacenter # Image is ignored, as we boot into rescue mode, but is a required field @@ -61,28 +61,9 @@ resource "hcloud_server" "under_test" { inline = [ "set -x", "set -e", - # "apt update", - # "apt install -y cargo", - # "cargo install coreos-installer", "chmod 755 /usr/local/bin/coreos-installer", - # Download and install Fedora CoreOS to /dev/sda "coreos-installer install /dev/sda -i /root/setup.ign", "shutdown -r now" ] } - - # # Configure CoreOS after installation - # provisioner "remote-exec" { - # connection { - # host = hcloud_server.under_test.ipv4_address - # timeout = "1m" - # agent = true - # user = "core" - # } - # - # inline = [ - # "sudo hostnamectl set-hostname ${hcloud_server.under_test.name}" - # # Add additional commands if needed - # ] - # } } diff --git a/restore-tests/variables.tf b/restore-tests/variables.tf index c36fa54..762e492 100644 --- a/restore-tests/variables.tf +++ b/restore-tests/variables.tf @@ -23,27 +23,26 @@ variable "files_dir" { default = "artifacts/" } -variable "hcloud_server_type" { +variable "hcloud_server_under_test_type" { + description = "vServer type name, lookup via `hcloud server-type list`" + type = string + default = "cx31" +} + +variable "hcloud_server_tester_type" { description = "vServer type name, lookup via `hcloud server-type list`" type = string default = "cx11" } +variable "hcloud_server_under_test_name" { + description = "Name of the server" + type = string + default = "www1" +} + variable "hcloud_server_datacenter" { description = "Desired datacenter location name, lookup via `hcloud datacenter list`" type = string default = "hel1-dc2" } - -variable "hcloud_server_name" { - description = "Name of the server" - type = string - default = "www1" -} - -# Update version to the latest release of fcct -variable "tools_fcct_version" { - description = "See https://github.com/coreos/fcct/releases for available versions" - type = string - default = "0.6.0" -} diff --git a/restore-tests/versions.tf b/restore-tests/versions.tf index d54181a..a5dd329 100644 --- a/restore-tests/versions.tf +++ b/restore-tests/versions.tf @@ -15,10 +15,6 @@ terraform { version = ">= 3.1.0" } - ignition = { - source = "community-terraform-providers/ignition" - version = ">= 2.1.0" - } } }