fix: fix errors on empty vars and cleanup unused vars
This commit is contained in:
parent
68cd598f25
commit
e86b398d1b
5
main.tf
5
main.tf
@ -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)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
24
variables.tf
24
variables.tf
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user