at master 718 B view raw
1resource "null_resource" "fcos_qcow2" { 2 provisioner "local-exec" { 3 command = "mv $(docker run --security-opt label=disable --pull=always --rm -v .:/data -w /data quay.io/coreos/coreos-installer:release download -p qemu -f qcow2.xz -s stable -a x86_64 -d) fedora-coreos.qcow2.img" 4 interpreter = ["PowerShell", "-Command"] 5 } 6 7 provisioner "local-exec" { 8 when = destroy 9 command = "rm -f fedora-coreos.qcow2.img" 10 interpreter = ["PowerShell", "-Command"] 11 } 12} 13 14resource "proxmox_virtual_environment_file" "fcos_qcow2" { 15 content_type = "iso" 16 datastore_id = "local" 17 node_name = "pve" 18 19 depends_on = [null_resource.fcos_qcow2] 20 21 source_file { 22 path = "fedora-coreos.qcow2.img" 23 } 24}