Manage file uploads with proxmox_download_file
mainThe proxmox_download_file resource manages file uploads using the Proxmox VE download-url API. It is a faster and fully compatible replacement for proxmox_virtual_environment_file for managing VM images (ISO and disk images) and LXC templates (CT Templates).
Permissions Required
In addition to the Datastore.AllocateTemplate privilege, this resource requires:
Sys.AuditSys.Modify
Enabling 'import' content type
The import content type is not enabled by default on Proxmox VE storages. To use content_type = "import", you must manually add Import to the allowed content types for the target storage via the Proxmox web interface under Datacenter > Storage.
resource "proxmox_download_file" "example" {
content_type = "iso"
datastore_id = "local"
file_name = "debian-12-generic-amd64-20231228-1609.img"
node_name = "pve"
url = "https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2"
checksum = "d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b"
checksum_algorithm = "sha512"
}