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
I'm working on a pull request for the terraform provider, and it looks like the qemuDisk's attribute storage_type is required for the creation/update of disks within a qemu resource, but that value is not returned by a call to NewConfigQemuFromApi. This is unfortunate as I'm not able to be sure of the current value to use for storage_type after creation (to detect drift and correctly update the terraform state).
Ideally, we could remove the need for storage_type as it appears to only be used here: https://github.com/Telmate/proxmox-api-go/blob/master/proxmox/config_qemu.go#L900 in order to format the disk path correctly. Perhaps we could issue another API query to proxmox to list storage types (/storage/<storage_name>) and pull out the type attribute from there? Then we wouldn't need storage_type at all.
Or, if not the above, when a VM is read perhaps we can re-use the logic from line 900 above to return the storage_type format required (dir vs rbd for example).
Thoughts? I'm happy to attempt a contribution of either approach depending on preference.
The text was updated successfully, but these errors were encountered:
I'm working on a pull request for the terraform provider, and it looks like the qemuDisk's attribute
storage_type
is required for the creation/update of disks within a qemu resource, but that value is not returned by a call toNewConfigQemuFromApi
. This is unfortunate as I'm not able to be sure of the current value to use forstorage_type
after creation (to detect drift and correctly update the terraform state).Ideally, we could remove the need for
storage_type
as it appears to only be used here: https://github.com/Telmate/proxmox-api-go/blob/master/proxmox/config_qemu.go#L900 in order to format the disk path correctly. Perhaps we could issue another API query to proxmox to list storage types (/storage/<storage_name>
) and pull out thetype
attribute from there? Then we wouldn't need storage_type at all.Or, if not the above, when a VM is read perhaps we can re-use the logic from line 900 above to return the storage_type format required (dir vs rbd for example).
Thoughts? I'm happy to attempt a contribution of either approach depending on preference.
The text was updated successfully, but these errors were encountered: