Terraform module which downloads cloud images or iso's on the proxmox host.
module "cloud-image" {
source = "../terraform-bpg-proxmox-cloud-image"
content_type = "iso"
datastore = "local"
nodename = "pve-host01"
url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"
checksum = "0d8345a343c2547e55ac815342e6cb4a593aa5556872651eb47e6856a2bb0cdd"
checksum_algorithm = "sha256"
}
Name | Version |
---|---|
terraform | >= 0.13 |
proxmox | >= 0.68.0 |
Name | Version |
---|---|
proxmox | >= 0.68.0 |
content_type
: The file content type. Must beiso
for VM images orvztmpl
for LXC images.datastore
: The identifier for the target datastore.nodename
: Hostname where the image/iso is allocated.url
: The URL to download the file from. Formathttps?://.*
.checksum
(Optional): The expected checksum of the file.checksum_algorithm
(Optional): The algorithm to calculate the checksum of the file. Must bemd5
|sha1
|sha224
|sha256
|sha384
|sha512
.
id
: The unique identifier of this resource.
- To use this module you need to load a .env file (
source .env
) exporting the following variables with their respective values:
export PROXMOX_VE_ENDPOINT=''
export PROXMOX_VE_API_TOKEN=''
export PROXMOX_VE_SSH_AGENT=true
export PROXMOX_VE_SSH_USERNAME=''