bpg / terraform-provider-proxmox

Terraform Provider for Proxmox
https://registry.terraform.io/providers/bpg/proxmox
Mozilla Public License 2.0
874 stars 139 forks source link

proxmox_virtual_environment_file checksum - add support for SHA512 and/or others #1623

Open piratecarrot opened 2 weeks ago

piratecarrot commented 2 weeks ago

Is your feature request related to a problem? Please describe. N/A

Describe the solution you'd like When getting specific resources from online sources, such as the Debian cloud images, they provide only SHA512 checksums.

Arch Linux with its PKGBUILD system has something similar where one or more different checksums of varying algorithms can be stated. https://wiki.archlinux.org/title/PKGBUILD Section 8 "Integrity".

I would like to see, checksum remain which defaults to SHA256 and porovides backward compatibility. In addition, add new optional fields:

Describe alternatives you've considered As a workaround I currently download the file locally, check the integrity using SHA512. If it passes, computer the SHA256 and use that within Terraform.

Additional context N/A

piratecarrot commented 1 week ago

Didn't realise there was proxmox_virtual_environment_download_file, which supports the checksum option.

Regardless, I created a proof of concept which seems to work well, for local files. https://github.com/siyka-au/terraform-provider-proxmox/tree/issues/1623

I am very new to terraform so I am still learning the ropes on that front.