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" : {
|
||||
"name" : each.value.name,
|
||||
"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
|
||||
# variable "pve_api_url" {
|
||||
# type = string
|
||||
# }
|
||||
|
||||
# variable "pve_api_token" {
|
||||
# type = string
|
||||
# }
|
||||
|
||||
variable "pve_ssh_keys" {
|
||||
type = list(string)
|
||||
}
|
||||
@ -16,27 +8,11 @@ variable "pve_node_name" {
|
||||
}
|
||||
|
||||
// Cloudflare
|
||||
variable "cloudflare_api_token" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "cloudflare_zones" {
|
||||
type = any
|
||||
}
|
||||
|
||||
// Univention
|
||||
variable "ucs_api_url" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "ucs_api_username" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "ucs_api_password" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "ucs_zones" {
|
||||
type = any
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user