You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
use of proxmox_virtual_environment_datastores with multiple datastores currently utilizes each attribute as an array, resulting in a sorting tf-logic nightmare; the output should instead be a list of datastore objects (perhaps utilizing a filter on resource input?)
the output seems to not follow the "normal" paradigm of output structures
To Reproduce
Steps to reproduce the behavior:
basic proxmox setup
setup below minimal hcl
tofu output
Please also provide a minimal Terraform configuration that reproduces the issue.
Additional context
(cant quite decide if this is a bug or feature; more like a QoL bug)
Single or clustered Proxmox: Single
Proxmox version: 8.2.2
Provider version (ideally it should be the latest version): registry.opentofu.org/bpg/proxmox v0.58.1
Terraform/OpenTofu version: OpenTofu v1.7.1
OS (where you run Terraform/OpenTofu from): archlinux
Debug logs (TF_LOG=DEBUG terraform apply): N/A
Workaround
mangle the data object with a locals blob; though i am not proud of this, it does get the job done (i did not optimize it from zombie-brain coding):
locals {
proxmox_virtual_environment_datastores__first_node=({
datastores = ([forindex_numinrange(0, length(data.proxmox_virtual_environment_datastores.first_node.enabled)) :merge(
{ id = data.proxmox_virtual_environment_datastores.first_node.id },
{ node_name = data.proxmox_virtual_environment_datastores.first_node.node_name },
[
fork, vindata.proxmox_virtual_environment_datastores.first_node: (
{
(k) = v[index_num]
}
) iflength(v) ==length(data.proxmox_virtual_environment_datastores.first_node.enabled)
]...)
])
}).datastores## and to get a list of only enabled data stores:proxmox_virtual_environment_datastores__first_node__enabled=[fork, vinlocal.proxmox_virtual_environment_datastores__first_node:vifv.enabled]
}
The text was updated successfully, but these errors were encountered:
I'm having the same "problem". I believe this could be handled the same way proxmox_virtual_environment_hagroups and proxmox_virtual_environment_hagroup are, using a proxmox_virtual_environment_datastores data source that gets the entire list of ids and then using a proxmox_virtual_environment_datastore referencing an id to retrieve a datastore object.
Describe the bug
use of
proxmox_virtual_environment_datastores
with multiple datastores currently utilizes each attribute as an array, resulting in a sorting tf-logic nightmare; the output should instead be a list of datastore objects (perhaps utilizing a filter on resource input?)the output seems to not follow the "normal" paradigm of output structures
To Reproduce
Steps to reproduce the behavior:
Please also provide a minimal Terraform configuration that reproduces the issue.
Expected behavior
Additional context
(cant quite decide if this is a bug or feature; more like a QoL bug)
TF_LOG=DEBUG terraform apply
): N/AWorkaround
mangle the data object with a locals blob; though i am not proud of this, it does get the job done (i did not optimize it from zombie-brain coding):
The text was updated successfully, but these errors were encountered: