fix: fix errors on empty vars and cleanup unused vars
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-package Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build-package Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-01-19 11:22:10 +01:00
parent 68cd598f25
commit e86b398d1b
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 4 additions and 25 deletions

View File

@ -96,7 +96,10 @@ resource "restapi_object" "ucs_server" {
"properties" : { "properties" : {
"name" : each.value.name, "name" : each.value.name,
"a" : concat( "a" : concat(
[for k, v in flatten(proxmox_virtual_environment_vm.server[each.value.name].ipv4_addresses) : v if k != index(proxmox_virtual_environment_vm.server[each.value.name].network_interface_names, "lo")], [
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)
],
), ),
} }
}) })

View File

@ -1,12 +1,4 @@
// Proxmox VE // Proxmox VE
# variable "pve_api_url" {
# type = string
# }
# variable "pve_api_token" {
# type = string
# }
variable "pve_ssh_keys" { variable "pve_ssh_keys" {
type = list(string) type = list(string)
} }
@ -16,27 +8,11 @@ variable "pve_node_name" {
} }
// Cloudflare // Cloudflare
variable "cloudflare_api_token" {
type = string
}
variable "cloudflare_zones" { variable "cloudflare_zones" {
type = any type = any
} }
// Univention // Univention
variable "ucs_api_url" {
type = string
}
variable "ucs_api_username" {
type = string
}
variable "ucs_api_password" {
type = string
}
variable "ucs_zones" { variable "ucs_zones" {
type = any type = any
} }