1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Download
  5. File
Proxmox Virtual Environment (Proxmox VE) v6.11.1 published on Friday, Jul 12, 2024 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Download.File

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v6.11.1 published on Friday, Jul 12, 2024 by Daniel Muehlbachler-Pietrzykowski

    Manages files upload using PVE download-url API. It can be fully compatible and faster replacement for image files created using proxmoxve.Storage.File. Supports images for VMs (ISO images) and LXC (CT Templates).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const release20231228Debian12BookwormQcow2Img = new proxmoxve.download.File("release20231228Debian12BookwormQcow2Img", {
        checksum: "d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b",
        checksumAlgorithm: "sha512",
        contentType: "iso",
        datastoreId: "local",
        fileName: "debian-12-generic-amd64-20231228-1609.img",
        nodeName: "pve",
        url: "https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2",
    });
    const latestDebian12BookwormQcow2Img = new proxmoxve.download.File("latestDebian12BookwormQcow2Img", {
        contentType: "iso",
        datastoreId: "local",
        fileName: "debian-12-generic-amd64.qcow2.img",
        nodeName: "pve",
        url: "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2",
    });
    const latestUbuntu22JammyQcow2Img = new proxmoxve.download.File("latestUbuntu22JammyQcow2Img", {
        contentType: "iso",
        datastoreId: "local",
        nodeName: "pve",
        url: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img",
    });
    const latestStaticUbuntu24NobleQcow2Img = new proxmoxve.download.File("latestStaticUbuntu24NobleQcow2Img", {
        contentType: "iso",
        datastoreId: "local",
        nodeName: "pve",
        overwrite: false,
        url: "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
    });
    const release20231211Ubuntu22JammyLxcImg = new proxmoxve.download.File("release20231211Ubuntu22JammyLxcImg", {
        checksum: "c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e",
        checksumAlgorithm: "sha256",
        contentType: "vztmpl",
        datastoreId: "local",
        nodeName: "pve",
        uploadTimeout: 4444,
        url: "https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz",
    });
    const latestUbuntu22JammyLxcImg = new proxmoxve.download.File("latestUbuntu22JammyLxcImg", {
        contentType: "vztmpl",
        datastoreId: "local",
        nodeName: "pve",
        url: "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz",
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    release20231228_debian12_bookworm_qcow2_img = proxmoxve.download.File("release20231228Debian12BookwormQcow2Img",
        checksum="d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b",
        checksum_algorithm="sha512",
        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")
    latest_debian12_bookworm_qcow2_img = proxmoxve.download.File("latestDebian12BookwormQcow2Img",
        content_type="iso",
        datastore_id="local",
        file_name="debian-12-generic-amd64.qcow2.img",
        node_name="pve",
        url="https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2")
    latest_ubuntu22_jammy_qcow2_img = proxmoxve.download.File("latestUbuntu22JammyQcow2Img",
        content_type="iso",
        datastore_id="local",
        node_name="pve",
        url="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img")
    latest_static_ubuntu24_noble_qcow2_img = proxmoxve.download.File("latestStaticUbuntu24NobleQcow2Img",
        content_type="iso",
        datastore_id="local",
        node_name="pve",
        overwrite=False,
        url="https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img")
    release20231211_ubuntu22_jammy_lxc_img = proxmoxve.download.File("release20231211Ubuntu22JammyLxcImg",
        checksum="c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e",
        checksum_algorithm="sha256",
        content_type="vztmpl",
        datastore_id="local",
        node_name="pve",
        upload_timeout=4444,
        url="https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz")
    latest_ubuntu22_jammy_lxc_img = proxmoxve.download.File("latestUbuntu22JammyLxcImg",
        content_type="vztmpl",
        datastore_id="local",
        node_name="pve",
        url="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz")
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/Download"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Download.NewFile(ctx, "release20231228Debian12BookwormQcow2Img", &Download.FileArgs{
    			Checksum:          pulumi.String("d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b"),
    			ChecksumAlgorithm: pulumi.String("sha512"),
    			ContentType:       pulumi.String("iso"),
    			DatastoreId:       pulumi.String("local"),
    			FileName:          pulumi.String("debian-12-generic-amd64-20231228-1609.img"),
    			NodeName:          pulumi.String("pve"),
    			Url:               pulumi.String("https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Download.NewFile(ctx, "latestDebian12BookwormQcow2Img", &Download.FileArgs{
    			ContentType: pulumi.String("iso"),
    			DatastoreId: pulumi.String("local"),
    			FileName:    pulumi.String("debian-12-generic-amd64.qcow2.img"),
    			NodeName:    pulumi.String("pve"),
    			Url:         pulumi.String("https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Download.NewFile(ctx, "latestUbuntu22JammyQcow2Img", &Download.FileArgs{
    			ContentType: pulumi.String("iso"),
    			DatastoreId: pulumi.String("local"),
    			NodeName:    pulumi.String("pve"),
    			Url:         pulumi.String("https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Download.NewFile(ctx, "latestStaticUbuntu24NobleQcow2Img", &Download.FileArgs{
    			ContentType: pulumi.String("iso"),
    			DatastoreId: pulumi.String("local"),
    			NodeName:    pulumi.String("pve"),
    			Overwrite:   pulumi.Bool(false),
    			Url:         pulumi.String("https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Download.NewFile(ctx, "release20231211Ubuntu22JammyLxcImg", &Download.FileArgs{
    			Checksum:          pulumi.String("c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e"),
    			ChecksumAlgorithm: pulumi.String("sha256"),
    			ContentType:       pulumi.String("vztmpl"),
    			DatastoreId:       pulumi.String("local"),
    			NodeName:          pulumi.String("pve"),
    			UploadTimeout:     pulumi.Int(4444),
    			Url:               pulumi.String("https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = Download.NewFile(ctx, "latestUbuntu22JammyLxcImg", &Download.FileArgs{
    			ContentType: pulumi.String("vztmpl"),
    			DatastoreId: pulumi.String("local"),
    			NodeName:    pulumi.String("pve"),
    			Url:         pulumi.String("https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        var release20231228Debian12BookwormQcow2Img = new ProxmoxVE.Download.File("release20231228Debian12BookwormQcow2Img", new()
        {
            Checksum = "d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b",
            ChecksumAlgorithm = "sha512",
            ContentType = "iso",
            DatastoreId = "local",
            FileName = "debian-12-generic-amd64-20231228-1609.img",
            NodeName = "pve",
            Url = "https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2",
        });
    
        var latestDebian12BookwormQcow2Img = new ProxmoxVE.Download.File("latestDebian12BookwormQcow2Img", new()
        {
            ContentType = "iso",
            DatastoreId = "local",
            FileName = "debian-12-generic-amd64.qcow2.img",
            NodeName = "pve",
            Url = "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2",
        });
    
        var latestUbuntu22JammyQcow2Img = new ProxmoxVE.Download.File("latestUbuntu22JammyQcow2Img", new()
        {
            ContentType = "iso",
            DatastoreId = "local",
            NodeName = "pve",
            Url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img",
        });
    
        var latestStaticUbuntu24NobleQcow2Img = new ProxmoxVE.Download.File("latestStaticUbuntu24NobleQcow2Img", new()
        {
            ContentType = "iso",
            DatastoreId = "local",
            NodeName = "pve",
            Overwrite = false,
            Url = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
        });
    
        var release20231211Ubuntu22JammyLxcImg = new ProxmoxVE.Download.File("release20231211Ubuntu22JammyLxcImg", new()
        {
            Checksum = "c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e",
            ChecksumAlgorithm = "sha256",
            ContentType = "vztmpl",
            DatastoreId = "local",
            NodeName = "pve",
            UploadTimeout = 4444,
            Url = "https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz",
        });
    
        var latestUbuntu22JammyLxcImg = new ProxmoxVE.Download.File("latestUbuntu22JammyLxcImg", new()
        {
            ContentType = "vztmpl",
            DatastoreId = "local",
            NodeName = "pve",
            Url = "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.Download.File;
    import com.pulumi.proxmoxve.Download.FileArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var release20231228Debian12BookwormQcow2Img = new File("release20231228Debian12BookwormQcow2Img", FileArgs.builder()
                .checksum("d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b")
                .checksumAlgorithm("sha512")
                .contentType("iso")
                .datastoreId("local")
                .fileName("debian-12-generic-amd64-20231228-1609.img")
                .nodeName("pve")
                .url("https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2")
                .build());
    
            var latestDebian12BookwormQcow2Img = new File("latestDebian12BookwormQcow2Img", FileArgs.builder()
                .contentType("iso")
                .datastoreId("local")
                .fileName("debian-12-generic-amd64.qcow2.img")
                .nodeName("pve")
                .url("https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2")
                .build());
    
            var latestUbuntu22JammyQcow2Img = new File("latestUbuntu22JammyQcow2Img", FileArgs.builder()
                .contentType("iso")
                .datastoreId("local")
                .nodeName("pve")
                .url("https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img")
                .build());
    
            var latestStaticUbuntu24NobleQcow2Img = new File("latestStaticUbuntu24NobleQcow2Img", FileArgs.builder()
                .contentType("iso")
                .datastoreId("local")
                .nodeName("pve")
                .overwrite(false)
                .url("https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img")
                .build());
    
            var release20231211Ubuntu22JammyLxcImg = new File("release20231211Ubuntu22JammyLxcImg", FileArgs.builder()
                .checksum("c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e")
                .checksumAlgorithm("sha256")
                .contentType("vztmpl")
                .datastoreId("local")
                .nodeName("pve")
                .uploadTimeout(4444)
                .url("https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz")
                .build());
    
            var latestUbuntu22JammyLxcImg = new File("latestUbuntu22JammyLxcImg", FileArgs.builder()
                .contentType("vztmpl")
                .datastoreId("local")
                .nodeName("pve")
                .url("https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz")
                .build());
    
        }
    }
    
    resources:
      release20231228Debian12BookwormQcow2Img:
        type: proxmoxve:Download:File
        properties:
          checksum: d2fbcf11fb28795842e91364d8c7b69f1870db09ff299eb94e4fbbfa510eb78d141e74c1f4bf6dfa0b7e33d0c3b66e6751886feadb4e9916f778bab1776bdf1b
          checksumAlgorithm: sha512
          contentType: iso
          datastoreId: local
          fileName: debian-12-generic-amd64-20231228-1609.img
          nodeName: pve
          url: https://cloud.debian.org/images/cloud/bookworm/20231228-1609/debian-12-generic-amd64-20231228-1609.qcow2
      latestDebian12BookwormQcow2Img:
        type: proxmoxve:Download:File
        properties:
          contentType: iso
          datastoreId: local
          fileName: debian-12-generic-amd64.qcow2.img
          nodeName: pve
          url: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
      latestUbuntu22JammyQcow2Img:
        type: proxmoxve:Download:File
        properties:
          contentType: iso
          datastoreId: local
          nodeName: pve
          url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
      latestStaticUbuntu24NobleQcow2Img:
        type: proxmoxve:Download:File
        properties:
          contentType: iso
          datastoreId: local
          nodeName: pve
          overwrite: false
          url: https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
      release20231211Ubuntu22JammyLxcImg:
        type: proxmoxve:Download:File
        properties:
          checksum: c9997dcfea5d826fd04871f960c513665f2e87dd7450bba99f68a97e60e4586e
          checksumAlgorithm: sha256
          contentType: vztmpl
          datastoreId: local
          nodeName: pve
          uploadTimeout: 4444
          url: https://cloud-images.ubuntu.com/releases/22.04/release-20231211/ubuntu-22.04-server-cloudimg-amd64-root.tar.xz
      latestUbuntu22JammyLxcImg:
        type: proxmoxve:Download:File
        properties:
          contentType: vztmpl
          datastoreId: local
          nodeName: pve
          url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.tar.gz
    

    Create File Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new File(name: string, args: FileArgs, opts?: CustomResourceOptions);
    @overload
    def File(resource_name: str,
             args: FileArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def File(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             content_type: Optional[str] = None,
             datastore_id: Optional[str] = None,
             node_name: Optional[str] = None,
             url: Optional[str] = None,
             checksum: Optional[str] = None,
             checksum_algorithm: Optional[str] = None,
             decompression_algorithm: Optional[str] = None,
             file_name: Optional[str] = None,
             overwrite: Optional[bool] = None,
             overwrite_unmanaged: Optional[bool] = None,
             upload_timeout: Optional[int] = None,
             verify: Optional[bool] = None)
    func NewFile(ctx *Context, name string, args FileArgs, opts ...ResourceOption) (*File, error)
    public File(string name, FileArgs args, CustomResourceOptions? opts = null)
    public File(String name, FileArgs args)
    public File(String name, FileArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Download:File
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var fileResource = new ProxmoxVE.Download.File("fileResource", new()
    {
        ContentType = "string",
        DatastoreId = "string",
        NodeName = "string",
        Url = "string",
        Checksum = "string",
        ChecksumAlgorithm = "string",
        DecompressionAlgorithm = "string",
        FileName = "string",
        Overwrite = false,
        OverwriteUnmanaged = false,
        UploadTimeout = 0,
        Verify = false,
    });
    
    example, err := Download.NewFile(ctx, "fileResource", &Download.FileArgs{
    	ContentType:            pulumi.String("string"),
    	DatastoreId:            pulumi.String("string"),
    	NodeName:               pulumi.String("string"),
    	Url:                    pulumi.String("string"),
    	Checksum:               pulumi.String("string"),
    	ChecksumAlgorithm:      pulumi.String("string"),
    	DecompressionAlgorithm: pulumi.String("string"),
    	FileName:               pulumi.String("string"),
    	Overwrite:              pulumi.Bool(false),
    	OverwriteUnmanaged:     pulumi.Bool(false),
    	UploadTimeout:          pulumi.Int(0),
    	Verify:                 pulumi.Bool(false),
    })
    
    var fileResource = new File("fileResource", FileArgs.builder()
        .contentType("string")
        .datastoreId("string")
        .nodeName("string")
        .url("string")
        .checksum("string")
        .checksumAlgorithm("string")
        .decompressionAlgorithm("string")
        .fileName("string")
        .overwrite(false)
        .overwriteUnmanaged(false)
        .uploadTimeout(0)
        .verify(false)
        .build());
    
    file_resource = proxmoxve.download.File("fileResource",
        content_type="string",
        datastore_id="string",
        node_name="string",
        url="string",
        checksum="string",
        checksum_algorithm="string",
        decompression_algorithm="string",
        file_name="string",
        overwrite=False,
        overwrite_unmanaged=False,
        upload_timeout=0,
        verify=False)
    
    const fileResource = new proxmoxve.download.File("fileResource", {
        contentType: "string",
        datastoreId: "string",
        nodeName: "string",
        url: "string",
        checksum: "string",
        checksumAlgorithm: "string",
        decompressionAlgorithm: "string",
        fileName: "string",
        overwrite: false,
        overwriteUnmanaged: false,
        uploadTimeout: 0,
        verify: false,
    });
    
    type: proxmoxve:Download:File
    properties:
        checksum: string
        checksumAlgorithm: string
        contentType: string
        datastoreId: string
        decompressionAlgorithm: string
        fileName: string
        nodeName: string
        overwrite: false
        overwriteUnmanaged: false
        uploadTimeout: 0
        url: string
        verify: false
    

    File Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The File resource accepts the following input properties:

    ContentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    DatastoreId string
    The identifier for the target datastore.
    NodeName string
    The node name.
    Url string
    The URL to download the file from. Format https?://.*.
    Checksum string
    The expected checksum of the file.
    ChecksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    DecompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    FileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    Overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    OverwriteUnmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    UploadTimeout int
    The file download timeout seconds. Default is 600 (10min).
    Verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    ContentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    DatastoreId string
    The identifier for the target datastore.
    NodeName string
    The node name.
    Url string
    The URL to download the file from. Format https?://.*.
    Checksum string
    The expected checksum of the file.
    ChecksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    DecompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    FileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    Overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    OverwriteUnmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    UploadTimeout int
    The file download timeout seconds. Default is 600 (10min).
    Verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    contentType String
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId String
    The identifier for the target datastore.
    nodeName String
    The node name.
    url String
    The URL to download the file from. Format https?://.*.
    checksum String
    The expected checksum of the file.
    checksumAlgorithm String
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    decompressionAlgorithm String
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName String
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    overwrite Boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged Boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    uploadTimeout Integer
    The file download timeout seconds. Default is 600 (10min).
    verify Boolean
    By default true. If false, no SSL/TLS certificates will be verified.
    contentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId string
    The identifier for the target datastore.
    nodeName string
    The node name.
    url string
    The URL to download the file from. Format https?://.*.
    checksum string
    The expected checksum of the file.
    checksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    decompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    overwrite boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    uploadTimeout number
    The file download timeout seconds. Default is 600 (10min).
    verify boolean
    By default true. If false, no SSL/TLS certificates will be verified.
    content_type str
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastore_id str
    The identifier for the target datastore.
    node_name str
    The node name.
    url str
    The URL to download the file from. Format https?://.*.
    checksum str
    The expected checksum of the file.
    checksum_algorithm str
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    decompression_algorithm str
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    file_name str
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwrite_unmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    upload_timeout int
    The file download timeout seconds. Default is 600 (10min).
    verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    contentType String
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId String
    The identifier for the target datastore.
    nodeName String
    The node name.
    url String
    The URL to download the file from. Format https?://.*.
    checksum String
    The expected checksum of the file.
    checksumAlgorithm String
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    decompressionAlgorithm String
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName String
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    overwrite Boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged Boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    uploadTimeout Number
    The file download timeout seconds. Default is 600 (10min).
    verify Boolean
    By default true. If false, no SSL/TLS certificates will be verified.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the File resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    The file size.
    Id string
    The provider-assigned unique ID for this managed resource.
    Size int
    The file size.
    id String
    The provider-assigned unique ID for this managed resource.
    size Integer
    The file size.
    id string
    The provider-assigned unique ID for this managed resource.
    size number
    The file size.
    id str
    The provider-assigned unique ID for this managed resource.
    size int
    The file size.
    id String
    The provider-assigned unique ID for this managed resource.
    size Number
    The file size.

    Look up Existing File Resource

    Get an existing File resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FileState, opts?: CustomResourceOptions): File
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            checksum: Optional[str] = None,
            checksum_algorithm: Optional[str] = None,
            content_type: Optional[str] = None,
            datastore_id: Optional[str] = None,
            decompression_algorithm: Optional[str] = None,
            file_name: Optional[str] = None,
            node_name: Optional[str] = None,
            overwrite: Optional[bool] = None,
            overwrite_unmanaged: Optional[bool] = None,
            size: Optional[int] = None,
            upload_timeout: Optional[int] = None,
            url: Optional[str] = None,
            verify: Optional[bool] = None) -> File
    func GetFile(ctx *Context, name string, id IDInput, state *FileState, opts ...ResourceOption) (*File, error)
    public static File Get(string name, Input<string> id, FileState? state, CustomResourceOptions? opts = null)
    public static File get(String name, Output<String> id, FileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Checksum string
    The expected checksum of the file.
    ChecksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    ContentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    DatastoreId string
    The identifier for the target datastore.
    DecompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    FileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    NodeName string
    The node name.
    Overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    OverwriteUnmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    Size int
    The file size.
    UploadTimeout int
    The file download timeout seconds. Default is 600 (10min).
    Url string
    The URL to download the file from. Format https?://.*.
    Verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    Checksum string
    The expected checksum of the file.
    ChecksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    ContentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    DatastoreId string
    The identifier for the target datastore.
    DecompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    FileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    NodeName string
    The node name.
    Overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    OverwriteUnmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    Size int
    The file size.
    UploadTimeout int
    The file download timeout seconds. Default is 600 (10min).
    Url string
    The URL to download the file from. Format https?://.*.
    Verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    checksum String
    The expected checksum of the file.
    checksumAlgorithm String
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    contentType String
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId String
    The identifier for the target datastore.
    decompressionAlgorithm String
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName String
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    nodeName String
    The node name.
    overwrite Boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged Boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    size Integer
    The file size.
    uploadTimeout Integer
    The file download timeout seconds. Default is 600 (10min).
    url String
    The URL to download the file from. Format https?://.*.
    verify Boolean
    By default true. If false, no SSL/TLS certificates will be verified.
    checksum string
    The expected checksum of the file.
    checksumAlgorithm string
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    contentType string
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId string
    The identifier for the target datastore.
    decompressionAlgorithm string
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName string
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    nodeName string
    The node name.
    overwrite boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    size number
    The file size.
    uploadTimeout number
    The file download timeout seconds. Default is 600 (10min).
    url string
    The URL to download the file from. Format https?://.*.
    verify boolean
    By default true. If false, no SSL/TLS certificates will be verified.
    checksum str
    The expected checksum of the file.
    checksum_algorithm str
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    content_type str
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastore_id str
    The identifier for the target datastore.
    decompression_algorithm str
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    file_name str
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    node_name str
    The node name.
    overwrite bool
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwrite_unmanaged bool
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    size int
    The file size.
    upload_timeout int
    The file download timeout seconds. Default is 600 (10min).
    url str
    The URL to download the file from. Format https?://.*.
    verify bool
    By default true. If false, no SSL/TLS certificates will be verified.
    checksum String
    The expected checksum of the file.
    checksumAlgorithm String
    The algorithm to calculate the checksum of the file. Must be md5 | sha1 | sha224 | sha256 | sha384 | sha512.
    contentType String
    The file content type. Must be iso for VM images or vztmpl for LXC images.
    datastoreId String
    The identifier for the target datastore.
    decompressionAlgorithm String
    Decompress the downloaded file using the specified compression algorithm. Must be one of gz | lzo | zst.
    fileName String
    The file name. If not provided, it is calculated using url. PVE will raise 'wrong file extension' error for some popular extensions file .raw or .qcow2. Workaround is to use e.g. .img instead.
    nodeName String
    The node name.
    overwrite Boolean
    If true and size of uploaded file is different, than size from url Content-Length header, file will be downloaded again. If false, there will be no checks.
    overwriteUnmanaged Boolean
    If true and a file with the same name already exists in the datastore, it will be deleted and the new file will be downloaded. If false and the file already exists, an error will be returned.
    size Number
    The file size.
    uploadTimeout Number
    The file download timeout seconds. Default is 600 (10min).
    url String
    The URL to download the file from. Format https?://.*.
    verify Boolean
    By default true. If false, no SSL/TLS certificates will be verified.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v6.11.1 published on Friday, Jul 12, 2024 by Daniel Muehlbachler-Pietrzykowski