From 0000e2a845e3173f74f455c789df8505a3f76c21 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 14 Mar 2024 20:54:45 +0100 Subject: [PATCH 1/2] chore: use opentofu and replace restapi provider --- .woodpecker/test.yml | 6 +++--- main.tf | 2 +- versions.tf | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index c3c4d6b..ce4875a 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -16,9 +16,9 @@ steps: commands: - tflint --color - - name: terraform - image: docker.io/jmccann/drone-terraform:8 + - name: tofu + image: quay.io/thegeeklab/wp-opentofu settings: actions: - validate - tf_version: 1.5.0 + tofu_version: 1.6.1 diff --git a/main.tf b/main.tf index e644c05..f765990 100644 --- a/main.tf +++ b/main.tf @@ -98,7 +98,7 @@ resource "restapi_object" "ucs_server" { "a" : concat( [ for k, v in flatten(coalesce(proxmox_virtual_environment_vm.server[each.value.name].ipv4_addresses, [])) : - v if k != try(index(proxmox_virtual_environment_vm.server[each.value.name].network_interface_names, "lo"), -1) + v if length(regexall(proxmox_virtual_environment_vm.server[each.value.name].network_interface_names[k], "^(lo|docker).*")) == 0 ], ), } diff --git a/versions.tf b/versions.tf index 51691be..11927e1 100644 --- a/versions.tf +++ b/versions.tf @@ -1,13 +1,13 @@ terraform { required_providers { cloudflare = { - source = "cloudflare/cloudflare" + source = "registry.opentofu.org/cloudflare/cloudflare" } proxmox = { - source = "bpg/proxmox" + source = "registry.opentofu.org/bpg/proxmox" } restapi = { - source = "mastercard/restapi" + source = "registry.opentofu.org/thegeeklab/restapi" } } } -- 2.45.2 From 4b216b5807bc2cd30c46dac800c7b414dc3b5cdd Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 14 Mar 2024 20:56:00 +0100 Subject: [PATCH 2/2] fix ci syntax --- .woodpecker/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index ce4875a..9ca203d 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -19,6 +19,6 @@ steps: - name: tofu image: quay.io/thegeeklab/wp-opentofu settings: - actions: + action: - validate tofu_version: 1.6.1 -- 2.45.2