proxmoxve.Download.File
Explore with Pulumi AI
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).
Besides the
Datastore.AllocateTemplate
privilege, this resource requires both theSys.Audit
andSys.Modify
privileges.
For more details, see thedownload-url
API documentation under the “Required permissions” section.
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)
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:
- Content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - Datastore
Id string - The identifier for the target datastore.
- Node
Name string - The node name.
- Url string
- The URL to download the file from. Format
https?://.*
. - Checksum string
- The expected checksum of the file.
- Checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - Decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - File
Name 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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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
. Iffalse
, no SSL/TLS certificates will be verified.
- Content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - Datastore
Id string - The identifier for the target datastore.
- Node
Name string - The node name.
- Url string
- The URL to download the file from. Format
https?://.*
. - Checksum string
- The expected checksum of the file.
- Checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - Decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - File
Name 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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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
. Iffalse
, no SSL/TLS certificates will be verified.
- content
Type String - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id String - The identifier for the target datastore.
- node
Name String - The node name.
- url String
- The URL to download the file from. Format
https?://.*
. - checksum String
- The expected checksum of the file.
- checksum
Algorithm String - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - decompression
Algorithm String - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - upload
Timeout Integer - The file download timeout seconds. Default is 600 (10min).
- verify Boolean
- By default
true
. Iffalse
, no SSL/TLS certificates will be verified.
- content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id string - The identifier for the target datastore.
- node
Name string - The node name.
- url string
- The URL to download the file from. Format
https?://.*
. - checksum string
- The expected checksum of the file.
- checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - upload
Timeout number - The file download timeout seconds. Default is 600 (10min).
- verify boolean
- By default
true
. Iffalse
, no SSL/TLS certificates will be verified.
- content_
type str - The file content type. Must be
iso
for VM images orvztmpl
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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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
. Iffalse
, no SSL/TLS certificates will be verified.
- content
Type String - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id String - The identifier for the target datastore.
- node
Name String - The node name.
- url String
- The URL to download the file from. Format
https?://.*
. - checksum String
- The expected checksum of the file.
- checksum
Algorithm String - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - decompression
Algorithm String - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - upload
Timeout Number - The file download timeout seconds. Default is 600 (10min).
- verify Boolean
- By default
true
. Iffalse
, 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:
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.
- Checksum string
- The expected checksum of the file.
- Checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - Content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - Datastore
Id string - The identifier for the target datastore.
- Decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - File
Name 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. - Node
Name string - The node name.
- Overwrite bool
- If
true
and size of uploaded file is different, than size fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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 string
- The URL to download the file from. Format
https?://.*
. - Verify bool
- By default
true
. Iffalse
, no SSL/TLS certificates will be verified.
- Checksum string
- The expected checksum of the file.
- Checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - Content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - Datastore
Id string - The identifier for the target datastore.
- Decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - File
Name 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. - Node
Name string - The node name.
- Overwrite bool
- If
true
and size of uploaded file is different, than size fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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 string
- The URL to download the file from. Format
https?://.*
. - Verify bool
- By default
true
. Iffalse
, no SSL/TLS certificates will be verified.
- checksum String
- The expected checksum of the file.
- checksum
Algorithm String - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - content
Type String - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id String - The identifier for the target datastore.
- decompression
Algorithm String - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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. - node
Name String - The node name.
- overwrite Boolean
- If
true
and size of uploaded file is different, than size fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - size Integer
- The file size.
- upload
Timeout 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
. Iffalse
, no SSL/TLS certificates will be verified.
- checksum string
- The expected checksum of the file.
- checksum
Algorithm string - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - content
Type string - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id string - The identifier for the target datastore.
- decompression
Algorithm string - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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. - node
Name string - The node name.
- overwrite boolean
- If
true
and size of uploaded file is different, than size fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - size number
- The file size.
- upload
Timeout 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
. Iffalse
, 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 orvztmpl
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 fromurl
Content-Length header, file will be downloaded again. Iffalse
, 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. Iffalse
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
. Iffalse
, no SSL/TLS certificates will be verified.
- checksum String
- The expected checksum of the file.
- checksum
Algorithm String - The algorithm to calculate the checksum of the file. Must be
md5
|sha1
|sha224
|sha256
|sha384
|sha512
. - content
Type String - The file content type. Must be
iso
for VM images orvztmpl
for LXC images. - datastore
Id String - The identifier for the target datastore.
- decompression
Algorithm String - Decompress the downloaded file using the specified compression algorithm. Must be one of
gz
|lzo
|zst
. - file
Name 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. - node
Name String - The node name.
- overwrite Boolean
- If
true
and size of uploaded file is different, than size fromurl
Content-Length header, file will be downloaded again. Iffalse
, there will be no checks. - overwrite
Unmanaged 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. Iffalse
and the file already exists, an error will be returned. - size Number
- The file size.
- upload
Timeout 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
. Iffalse
, 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.