@muhlba91/pulumi-proxmoxve
Version:
A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.
1,712 lines (1,711 loc) • 118 kB
TypeScript
import * as outputs from "../types/output";
export interface ContainerLegacyClone {
/**
* The identifier for the target datastore.
*/
datastoreId?: string;
/**
* When cloning, create a full copy of all disks. Set
* to `false` to create a linked clone. Linked clones require the source
* container to be a template on storage that supports copy-on-write
* (e.g. Ceph RBD) (defaults to `true`).
*/
full?: boolean;
/**
* The name of the source node (leave blank, if
* equal to the `nodeName` argument).
*/
nodeName?: string;
/**
* The identifier for the source container.
*/
vmId: number;
}
export interface ContainerLegacyConsole {
/**
* Whether to enable the console device (defaults
* to `true`).
*/
enabled?: boolean;
/**
* The number of available TTY (defaults to `2`).
*/
ttyCount?: number;
/**
* The console mode (defaults to `tty`).
*/
type?: string;
}
export interface ContainerLegacyCpu {
/**
* The CPU architecture (defaults to `amd64`).
*/
architecture?: string;
/**
* The number of CPU cores (defaults to `1`).
*/
cores?: number;
/**
* Limit of CPU usage. Value `0` indicates no limit (defaults to `0`).
*/
limit?: number;
/**
* The CPU units (defaults to `1024`).
*/
units: number;
}
export interface ContainerLegacyDevicePassthrough {
/**
* Deny the container to write to the device (defaults to `false`).
*/
denyWrite?: boolean;
/**
* Group ID to be assigned to the device node.
*/
gid?: number;
/**
* Access mode to be set on the device node. Must be a
* 4-digit octal number.
*/
mode?: string;
/**
* Device to pass through to the container (e.g. `/dev/sda`).
*/
path: string;
/**
* User ID to be assigned to the device node.
*/
uid?: number;
}
export interface ContainerLegacyDisk {
/**
* Explicitly enable or disable ACL support
*/
acl?: boolean;
/**
* The Proxmox storage ID where the rootfs
* volume is created (defaults to `local`).
*/
datastoreId?: string;
/**
* List of extra mount options.
*/
mountOptions?: string[];
/**
* The in-datastore path to the disk image.
* Use this attribute for cross-resource references.
*/
pathInDatastore: string;
/**
* Enable user quotas for the container rootfs
*/
quota?: boolean;
/**
* Will include this volume to a storage replica job
*/
replicate?: boolean;
/**
* The size of the root filesystem in gigabytes (defaults
* to `4`). When set to 0 a directory or zfs/btrfs subvolume will be created.
* Requires `datastoreId` to be set.
*/
size?: number;
}
export interface ContainerLegacyFeatures {
/**
* Whether the container supports FUSE mounts (defaults to `false`)
*/
fuse?: boolean;
/**
* Whether the container supports `keyctl()` system call (defaults to `false`)
*/
keyctl?: boolean;
/**
* Whether the container supports `mknod()` system call (defaults to `false`)
*/
mknod?: boolean;
/**
* List of allowed mount types (`cifs` or `nfs`)
*/
mounts?: string[];
/**
* Whether the container is nested (defaults to `false`)
*/
nesting?: boolean;
}
export interface ContainerLegacyIdmap {
/**
* Starting ID in the container namespace.
*/
containerId: number;
/**
* Starting ID in the host namespace.
*/
hostId: number;
/**
* Number of IDs to map (must be at least `1`).
*/
size: number;
/**
* Mapping type (`uid` or `gid`).
*/
type: string;
}
export interface ContainerLegacyInitialization {
/**
* The DNS configuration.
*/
dns?: outputs.ContainerLegacyInitializationDns;
/**
* Command to run as init, optionally with arguments. It may start with an absolute path, relative path, or a binary in `$PATH`.
*/
entrypoint?: string;
/**
* The hostname. Must be a valid DNS name.
*/
hostname?: string;
/**
* The IP configuration (one block per network
* device).
*/
ipConfigs?: outputs.ContainerLegacyInitializationIpConfig[];
/**
* The user account configuration.
*/
userAccount?: outputs.ContainerLegacyInitializationUserAccount;
}
export interface ContainerLegacyInitializationDns {
/**
* The DNS search domain.
*/
domain?: string;
/**
* The DNS server.
* The `server` attribute is deprecated and will be removed in a future release. Please use
* the `servers` attribute instead.
*
* @deprecated The `server` attribute is deprecated and will be removed in a future release. Please use the `servers` attribute instead.
*/
server?: string;
/**
* The list of DNS servers.
*/
servers?: string[];
}
export interface ContainerLegacyInitializationIpConfig {
/**
* The IPv4 configuration.
*/
ipv4?: outputs.ContainerLegacyInitializationIpConfigIpv4;
/**
* The IPv6 configuration.
*/
ipv6?: outputs.ContainerLegacyInitializationIpConfigIpv6;
}
export interface ContainerLegacyInitializationIpConfigIpv4 {
/**
* The IPv4 address in CIDR notation
* (e.g. 192.168.2.2/24). Alternatively, set this to `dhcp` for
* autodiscovery.
*/
address?: string;
/**
* The IPv4 gateway (must be omitted
* when `dhcp` is used as the address).
*/
gateway?: string;
}
export interface ContainerLegacyInitializationIpConfigIpv6 {
/**
* The IPv6 address in CIDR notation
* (e.g. fd1c::7334/64). Alternatively, set this
* to `dhcp` for DHCPv6, or `auto` for SLAAC.
*/
address?: string;
/**
* The IPv6 gateway (must be omitted
* when `dhcp` or `auto` are used as the address).
*/
gateway?: string;
}
export interface ContainerLegacyInitializationUserAccount {
/**
* The SSH keys for the root account.
*/
keys?: string[];
/**
* The password for the root account.
*/
password?: string;
}
export interface ContainerLegacyMemory {
/**
* The dedicated memory in megabytes (defaults
* to `512`).
*/
dedicated?: number;
/**
* The swap size in megabytes (defaults to `0`).
*/
swap?: number;
}
export interface ContainerLegacyMountPoint {
/**
* Explicitly enable or disable ACL support.
*/
acl?: boolean;
/**
* Whether to include the mount point in backups (only
* used for volume mount points, defaults to `false`).
*/
backup?: boolean;
/**
* List of extra mount options.
*/
mountOptions?: string[];
/**
* Path to the mount point as seen from inside the
* container.
*/
path: string;
/**
* The in-datastore path to the mount point volume.
* Use this attribute for cross-resource references instead of `volume`.
*/
pathInDatastore: string;
/**
* Enable user quotas inside the container (not supported
* with ZFS subvolumes).
*/
quota?: boolean;
/**
* Read-only mount point.
*/
readOnly?: boolean;
/**
* Will include this volume to a storage replica job.
*/
replicate?: boolean;
/**
* Mark this non-volume mount point as available on all
* nodes.
*/
shared?: boolean;
/**
* Volume size (only for volume mount points).
* Can be specified with a unit suffix (e.g. `10G`).
*/
size?: string;
/**
* Volume reference. Accepts a Proxmox storage ID
* (e.g. `local-lvm`) to allocate a new volume, a full PVE volume ID
* (e.g. `local-lvm:subvol-108-disk-101`) to mount an existing volume,
* or an absolute host path (e.g. `/mnt/bindmounts/shared`) to
* bind-mount a host directory.
*/
volume: string;
}
export interface ContainerLegacyNetworkInterface {
/**
* The name of the network bridge (defaults
* to `vmbr0`).
*/
bridge?: string;
/**
* Whether to enable the network device (defaults
* to `true`).
*/
enabled?: boolean;
/**
* Whether this interface's firewall rules should be
* used (defaults to `false`).
*/
firewall?: boolean;
/**
* Whether the host runs DHCP on this interface's
* behalf (defaults to `false`). Requires Proxmox VE 9.1+. Required for
* application containers that do not include a DHCP client.
*/
hostManaged?: boolean;
/**
* The MAC address.
*/
macAddress: string;
/**
* Maximum transfer unit of the interface. Cannot be
* larger than the bridge's MTU.
*/
mtu?: number;
/**
* The network interface name.
*/
name: string;
/**
* The rate limit in megabytes per second.
*/
rateLimit?: number;
/**
* The VLAN identifier.
*/
vlanId?: number;
}
export interface ContainerLegacyOperatingSystem {
/**
* The identifier for an OS template file.
* The ID format is `<datastore_id>:<content_type>/<file_name>`, for example `local:iso/jammy-server-cloudimg-amd64.tar.gz`.
* Can be also taken from `proxmoxve.download.FileLegacy` resource, or from the output of `pvesm list <storage>`.
*/
templateFileId: string;
/**
* The type (defaults to `unmanaged`).
*/
type?: string;
}
export interface ContainerLegacyStartup {
/**
* A non-negative number defining the delay in
* seconds before the next container is shut down.
*/
downDelay?: number;
/**
* A non-negative number defining the general startup
* order.
*/
order?: number;
/**
* A non-negative number defining the delay in
* seconds before the next container is started.
*/
upDelay?: number;
}
export interface ContainerLegacyWaitForIp {
/**
* Wait for at least one IPv4 address (non-loopback, non-link-local) (defaults to `false`).
*/
ipv4?: boolean;
/**
* Wait for at least one IPv6 address (non-loopback, non-link-local) (defaults to `false`).
*
* When `waitForIp` is not specified or both `ipv4` and `ipv6` are `false`, the provider waits for any valid global unicast address (IPv4 or IPv6). In dual-stack networks where DHCPv6 responds faster, this may result in only IPv6 addresses being available. Set `ipv4 = true` to ensure IPv4 address availability.
*/
ipv6?: boolean;
}
export interface FileLegacySourceFile {
/**
* Whether the source file has changed since the last run
*/
changed?: boolean;
/**
* The SHA256 checksum of the source file.
*/
checksum?: string;
/**
* The file name to use instead of the source file
* name. Useful when the source file does not have a valid file extension,
* for example when the source file is a URL referencing a `.qcow2` image.
*/
fileName?: string;
/**
* Whether to skip the TLS verification step for
* HTTPS sources (defaults to `false`).
*/
insecure?: boolean;
/**
* The minimum required TLS version for HTTPS
* sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).
*/
minTls?: string;
/**
* A path to a local file or a URL.
*/
path: string;
}
export interface FileLegacySourceRaw {
/**
* The raw data.
*/
data: string;
/**
* The file name.
*/
fileName: string;
/**
* The number of bytes to resize the file to.
*/
resize?: number;
}
export interface GetContainersLegacyContainer {
/**
* The container name.
*/
name: string;
/**
* The node name. All cluster nodes will be queried in case this is omitted
*/
nodeName: string;
/**
* The status of the container.
*/
status?: string;
/**
* A list of tags to filter the containers. The container must have all
* the tags to be included in the result.
*/
tags: string[];
/**
* Whether the container is a template.
*/
template?: boolean;
/**
* The container identifier.
*/
vmId: number;
}
export interface GetContainersLegacyFilter {
/**
* Name of the container attribute to filter on. One of [`name`, `template`, `status`, `nodeName`]
*/
name: string;
/**
* Treat values as regex patterns
*/
regex?: boolean;
/**
* List of values to pass the filter. Container's attribute should match at least one value in the list.
*/
values: string[];
}
export interface GetDatastoresDatastore {
/**
* Whether the store is active.
*/
active?: boolean;
/**
* Allowed store content types.
*/
contentTypes: string[];
/**
* Whether the store is enabled.
*/
enabled?: boolean;
/**
* The ID of the store.
*/
id: string;
/**
* The name of the node the store is on.
*/
nodeName: string;
/**
* Shared flag from store configuration.
*/
shared?: boolean;
/**
* Available store space in bytes.
*/
spaceAvailable?: number;
/**
* Total store space in bytes.
*/
spaceTotal?: number;
/**
* Used store space in bytes.
*/
spaceUsed?: number;
/**
* Used fraction (used/total).
*/
spaceUsedFraction?: number;
/**
* Store type.
*/
type: string;
}
export interface GetDatastoresFilters {
/**
* Only list stores with the given content types.
*/
contentTypes?: string[];
/**
* Only list stores with the given ID.
*/
id?: string;
/**
* If `target` is different to `nodeName`, then only lists shared stores which content is accessible on this node and the specified `target` node.
*/
target?: string;
}
export interface GetDatastoresLegacyDatastore {
/**
* Whether the store is active.
*/
active?: boolean;
/**
* Allowed store content types.
*/
contentTypes: string[];
/**
* Whether the store is enabled.
*/
enabled?: boolean;
/**
* The ID of the store.
*/
id: string;
/**
* The name of the node the store is on.
*/
nodeName: string;
/**
* Shared flag from store configuration.
*/
shared?: boolean;
/**
* Available store space in bytes.
*/
spaceAvailable?: number;
/**
* Total store space in bytes.
*/
spaceTotal?: number;
/**
* Used store space in bytes.
*/
spaceUsed?: number;
/**
* Used fraction (used/total).
*/
spaceUsedFraction?: number;
/**
* Store type.
*/
type: string;
}
export interface GetDatastoresLegacyFilters {
/**
* Only list stores with the given content types.
*/
contentTypes?: string[];
/**
* Only list stores with the given ID.
*/
id?: string;
/**
* If `target` is different to `nodeName`, then only lists shared stores which content is accessible on this node and the specified `target` node.
*/
target?: string;
}
export interface GetFilesFile {
/**
* The content type of the file.
*/
contentType: string;
/**
* The format of the file.
*/
fileFormat: string;
/**
* The name of the file.
*/
fileName: string;
/**
* The size of the file in bytes.
*/
fileSize: number;
/**
* The unique identifier of the file (volume ID), e.g. `local:iso/ubuntu.iso`.
*/
id: string;
/**
* The VM ID associated with the file, if applicable.
*/
vmid: number;
}
export interface GetGroupLegacyAcl {
/**
* The path.
*/
path: string;
/**
* Whether to propagate to child paths.
*/
propagate: boolean;
/**
* The role identifier.
*/
roleId: string;
}
export interface GetHostsLegacyEntry {
/**
* The address
*/
address: string;
/**
* The hostnames associated with each of the IP addresses.
*/
hostnames: string[];
}
export interface GetPoolLegacyMember {
/**
* The datastore identifier.
*/
datastoreId: string;
/**
* The member identifier.
*/
id: string;
/**
* The node name.
*/
nodeName: string;
/**
* The member type.
*/
type: string;
/**
* The virtual machine identifier.
*/
vmId: number;
}
export interface GetReplicationsLegacyReplication {
comment: string;
disable: boolean;
guest: number;
id: string;
jobnum: number;
rate: number;
removeJob: string;
schedule: string;
source: string;
target: string;
type: string;
}
export interface GetReplicationsReplication {
comment: string;
disable: boolean;
guest: number;
id: string;
jobnum: number;
rate: number;
removeJob: string;
schedule: string;
source: string;
target: string;
type: string;
}
export interface GetUserLegacyAcl {
/**
* The path.
*/
path: string;
/**
* Whether to propagate to child paths.
*/
propagate: boolean;
/**
* The role identifier.
*/
roleId: string;
}
export interface GetVm2LegacyCdrom {
/**
* The file ID of the CD-ROM.
*/
fileId: string;
}
export interface GetVm2LegacyCpu {
/**
* List of host cores used to execute guest processes, for example: '0,5,8-11'
*/
affinity: string;
/**
* The CPU architecture.
*/
architecture: string;
/**
* The number of CPU cores per socket.
*/
cores: number;
/**
* Set of additional CPU flags.
*/
flags: string[];
/**
* Limit of CPU usage.
*/
limit: number;
/**
* Whether NUMA emulation is enabled.
*/
numa: boolean;
/**
* The number of CPU sockets.
*/
sockets: number;
/**
* Emulated CPU type.
*/
type: string;
/**
* CPU weight for a VM
*/
units: number;
/**
* Number of active vCPUs.
*/
vcpus: number;
}
export interface GetVm2LegacyRng {
/**
* Maximum bytes of entropy allowed to get injected into the guest every period.
*/
maxBytes: number;
/**
* Period in milliseconds to limit entropy injection to the guest.
*/
period: number;
/**
* The entropy source for the RNG device.
*/
source: string;
}
export interface GetVm2LegacyTimeouts {
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
*/
read?: string;
}
export interface GetVm2LegacyVga {
/**
* Enable a specific clipboard.
*/
clipboard: string;
/**
* The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
*/
memory: number;
/**
* The VGA type.
*/
type: string;
}
export interface GetVmCdrom {
/**
* The file ID of the CD-ROM.
*/
fileId: string;
}
export interface GetVmCpu {
/**
* List of host cores used to execute guest processes, for example: '0,5,8-11'
*/
affinity: string;
/**
* The CPU architecture.
*/
architecture: string;
/**
* The number of CPU cores per socket.
*/
cores: number;
/**
* Set of additional CPU flags.
*/
flags: string[];
/**
* Limit of CPU usage.
*/
limit: number;
/**
* Whether NUMA emulation is enabled.
*/
numa: boolean;
/**
* The number of CPU sockets.
*/
sockets: number;
/**
* Emulated CPU type.
*/
type: string;
/**
* CPU weight for a VM
*/
units: number;
/**
* Number of active vCPUs.
*/
vcpus: number;
}
export interface GetVmRng {
/**
* Maximum bytes of entropy allowed to get injected into the guest every period.
*/
maxBytes: number;
/**
* Period in milliseconds to limit entropy injection to the guest.
*/
period: number;
/**
* The entropy source for the RNG device.
*/
source: string;
}
export interface GetVmTimeouts {
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
*/
read?: string;
}
export interface GetVmVga {
/**
* Enable a specific clipboard.
*/
clipboard: string;
/**
* The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
*/
memory: number;
/**
* The VGA type.
*/
type: string;
}
export interface GetVmsLegacyFilter {
/**
* Name of the VM attribute to filter on. One of [`name`, `template`, `status`, `nodeName`]
*/
name: string;
/**
* Treat values as regex patterns
*/
regex?: boolean;
/**
* List of values to pass the filter. VM's attribute should match at least one value in the list.
*/
values: string[];
}
export interface GetVmsLegacyVm {
/**
* The virtual machine name.
*/
name: string;
/**
* The node name. All cluster nodes will be queried in case this is omitted
*/
nodeName: string;
/**
* The status of the VM.
*/
status?: string;
/**
* A list of tags to filter the VMs. The VM must have all
* the tags to be included in the result.
*/
tags: string[];
/**
* Whether the VM is a template.
*/
template?: boolean;
/**
* The VM identifier.
*/
vmId: number;
}
export interface GroupLegacyAcl {
/**
* The path.
*/
path: string;
/**
* Whether to propagate to child paths.
*/
propagate?: boolean;
/**
* The role identifier.
*/
roleId: string;
}
export interface HostsLegacyEntry {
/**
* The IP address.
*/
address: string;
/**
* The hostnames.
*/
hostnames: string[];
}
export interface PoolLegacyMember {
/**
* The datastore identifier.
*/
datastoreId: string;
/**
* The member identifier.
*/
id: string;
/**
* The node name.
*/
nodeName: string;
/**
* The member type.
*/
type: string;
/**
* The virtual machine identifier.
*/
vmId: number;
}
export interface UserLegacyAcl {
/**
* The path.
*/
path: string;
/**
* Whether to propagate to child paths.
*/
propagate?: boolean;
/**
* The role identifier.
*/
roleId: string;
}
export interface Vm2LegacyCdrom {
/**
* The file ID of the CD-ROM, or `cdrom|none`. Defaults to `cdrom` (i.e. empty CD-ROM drive — `cdrom` is PVE's literal "no media inserted" storage path). Use `none` to leave the CD-ROM unplugged, or a storage path like `local:iso/debian.iso` to insert an image.
*/
fileId: string;
}
export interface Vm2LegacyCpu {
/**
* The CPU cores that are used to run the VM’s vCPU. The value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based. For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user.
*/
affinity?: string;
/**
* The CPU architecture `<aarch64 | x86_64>` (defaults to the host). Setting `architecture` is only allowed for `root@pam` authenticated user.
*/
architecture?: string;
/**
* The number of CPU cores per socket (PVE defaults to `1` when unset).
*/
cores?: number;
/**
* Set of additional CPU flags. Use `+FLAG` to enable, `-FLAG` to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: `pcid`, `spec-ctrl`, `ibpb`, `ssbd`, `virt-ssbd`, `amd-ssbd`, `amd-no-ssb`, `pdpe1gb`, `md-clear`, `hv-tlbflush`, `hv-evmcs`, `aes`.
*/
flags?: string[];
/**
* Limit of CPU usage. `0` means no limit (PVE default).
*/
limit?: number;
/**
* Enable NUMA topology emulation. Matches the PVE Processors → **Enable NUMA** checkbox.
*/
numa?: boolean;
/**
* The number of CPU sockets (PVE defaults to `1` when unset).
*/
sockets?: number;
/**
* Emulated CPU type, it's recommended to use `x86-64-v2-AES` or higher. See [the PVE admin guide](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings) for the full list of supported types.
*/
type?: string;
/**
* CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs. On cgroup v2 `0` is a valid value meaning disable CPU share weighting.
*/
units?: number;
/**
* Number of vCPUs started with the VM, bounded by `cores * sockets`. Matches the PVE Processors → **VCPUs** field. Leave unset to start with `cores * sockets` vCPUs. Requires PVE hotplug feature enabled to change at runtime.
*/
vcpus?: number;
}
export interface Vm2LegacyRng {
/**
* Maximum bytes of entropy allowed to get injected into the guest every period.
*/
maxBytes?: number;
/**
* Period in milliseconds to limit entropy injection to the guest.
*/
period?: number;
/**
* The file on the host to gather entropy from. In most cases, `/dev/urandom` should be preferred over `/dev/random` to avoid entropy-starvation issues on the host.
*/
source?: string;
}
export interface Vm2LegacyTimeouts {
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
*/
create?: string;
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
*/
delete?: string;
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
*/
read?: string;
/**
* A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
*/
update?: string;
}
export interface Vm2LegacyVga {
/**
* Enable a specific clipboard. If not set, depending on the display type the SPICE one will be added. Currently only `vnc` is available. Migration with VNC clipboard is not supported by Proxmox.
*/
clipboard?: string;
/**
* The VGA memory in megabytes (4-512 MB). Has no effect with serial display.
*/
memory?: number;
/**
* The VGA type (defaults to `std`).
*/
type?: string;
}
export interface VmCdrom {
/**
* The file ID of the CD-ROM, or `cdrom|none`. Defaults to `cdrom` (i.e. empty CD-ROM drive — `cdrom` is PVE's literal "no media inserted" storage path). Use `none` to leave the CD-ROM unplugged, or a storage path like `local:iso/debian.iso` to insert an image.
*/
fileId: string;
}
export interface VmCpu {
/**
* The CPU cores that are used to run the VM’s vCPU. The value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based. For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user.
*/
affinity?: string;
/**
* The CPU architecture `<aarch64 | x86_64>` (defaults to the host). Setting `architecture` is only allowed for `root@pam` authenticated user.
*/
architecture?: string;
/**
* The number of CPU cores per socket (PVE defaults to `1` when unset).
*/
cores?: number;
/**
* Set of additional CPU flags. Use `+FLAG` to enable, `-FLAG` to disable a flag. Custom CPU models can specify any flag supported by QEMU/KVM, VM-specific flags must be from the following set for security reasons: `pcid`, `spec-ctrl`, `ibpb`, `ssbd`, `virt-ssbd`, `amd-ssbd`, `amd-no-ssb`, `pdpe1gb`, `md-clear`, `hv-tlbflush`, `hv-evmcs`, `aes`.
*/
flags?: string[];
/**
* Limit of CPU usage. `0` means no limit (PVE default).
*/
limit?: number;
/**
* Enable NUMA topology emulation. Matches the PVE Processors → **Enable NUMA** checkbox.
*/
numa?: boolean;
/**
* The number of CPU sockets (PVE defaults to `1` when unset).
*/
sockets?: number;
/**
* Emulated CPU type, it's recommended to use `x86-64-v2-AES` or higher. See [the PVE admin guide](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_virtual_machines_settings) for the full list of supported types.
*/
type?: string;
/**
* CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs. On cgroup v2 `0` is a valid value meaning disable CPU share weighting.
*/
units?: number;
/**
* Number of vCPUs started with the VM, bounded by `cores * sockets`. Matches the PVE Processors → **VCPUs** field. Leave unset to start with `cores * sockets` vCPUs. Requires PVE hotplug feature enabled to change at runtime.
*/
vcpus?: number;
}
export interface VmLegacyAgent {
/**
* Whether to enable the QEMU agent (defaults
* to `false`).
*/
enabled?: boolean;
/**
* The maximum amount of time to wait for data from
* the QEMU agent to become available ( defaults to `15m`).
*/
timeout?: string;
/**
* Whether to enable the FSTRIM feature in the QEMU agent
* (defaults to `false`).
*/
trim?: boolean;
/**
* The QEMU agent interface type (defaults to `virtio`).
*/
type?: string;
/**
* Configuration for waiting for specific IP address types when the VM starts.
*/
waitForIp?: outputs.VmLegacyAgentWaitForIp;
}
export interface VmLegacyAgentWaitForIp {
/**
* Whether to disable waiting for the agent to report an IP address (defaults to `false`). Set to `true` to skip the IP lookup entirely, so the provider does not wait for the agent during `refresh` and at the end of `apply`. Useful when the guest agent is slow to start, not yet installed, or not running, to avoid blocking those operations. When disabled, `ipv4Addresses`, `ipv6Addresses`, and `networkInterfaceNames` are left empty.
*/
disabled?: boolean;
/**
* Wait for at least one IPv4 address (non-loopback, non-link-local) (defaults to `false`).
*/
ipv4?: boolean;
/**
* Wait for at least one IPv6 address (non-loopback, non-link-local) (defaults to `false`).
*
* When `waitForIp` is not specified or both `ipv4` and `ipv6` are `false` (and `disabled` is `false`), the provider waits for any valid global unicast address (IPv4 or IPv6). In dual-stack networks where DHCPv6 responds faster, this may result in only IPv6 addresses being available. Set `ipv4 = true` to ensure IPv4 address availability.
*/
ipv6?: boolean;
}
export interface VmLegacyAmdSev {
/**
* Sets policy bit to allow Simultaneous Multi Threading (SMT)
* (Ignored unless for SEV-SNP) (defaults to `true`).
*/
allowSmt?: boolean;
/**
* Add kernel hashes to guest firmware for measured linux kernel launch (defaults to `false`).
*/
kernelHashes?: boolean;
/**
* Sets policy bit to disallow debugging of guest (defaults
* to `false`).
*/
noDebug?: boolean;
/**
* Sets policy bit to disallow key sharing with other guests (Ignored for SEV-SNP) (defaults to `false`).
*
* The `amdSev` setting is only allowed for a `root@pam` authenticated user.
*/
noKeySharing?: boolean;
/**
* Enable standard SEV with `std` or enable experimental SEV-ES with the `es` option or enable experimental SEV-SNP with the `snp` option (defaults to `std`).
*/
type?: string;
}
export interface VmLegacyAudioDevice {
/**
* The device (defaults to `intel-hda`).
* - `AC97` - Intel 82801AA AC97 Audio.
* - `ich9-intel-hda` - Intel HD Audio Controller (ich9).
* - `intel-hda` - Intel HD Audio.
*/
device?: string;
/**
* The driver (defaults to `spice`).
*/
driver?: string;
/**
* Whether to enable the audio device (defaults
* to `true`).
*/
enabled?: boolean;
}
export interface VmLegacyCdrom {
/**
* Whether to enable the CD-ROM drive (defaults
* to `false`). *Deprecated*. The attribute will be removed in the next version of the provider.
* Set `fileId` to `none` to leave the CD-ROM drive empty.
*
* @deprecated Remove this attribute's configuration as it is no longer used and the attribute will be removed in the next version of the provider. Set `fileId` to `none` to leave the CDROM drive empty.
*/
enabled?: boolean;
/**
* A file ID for an ISO file (defaults to `cdrom` as
* in the physical drive). Use `none` to leave the CD-ROM drive empty.
*/
fileId?: string;
/**
* A hardware interface to connect CD-ROM drive to (defaults to `ide3`).
* "Must be one of `ideN`, `sataN`, `scsiN`, where N is the index of the interface. " +
* "Note that `q35` machine type only supports `ide0` and `ide2` of IDE interfaces.
*/
interface?: string;
}
export interface VmLegacyClone {
/**
* The identifier for the target datastore.
*/
datastoreId?: string;
/**
* Full or linked clone (defaults to `true`).
*/
full?: boolean;
/**
* The name of the source node (leave blank, if
* equal to the `nodeName` argument).
*/
nodeName?: string;
/**
* Number of retries in Proxmox for clone vm.
* Sometimes Proxmox errors with timeout when creating multiple clones at
* once.
*/
retries?: number;
/**
* The identifier for the source VM.
*/
vmId: number;
}
export interface VmLegacyCpu {
/**
* The CPU cores that are used to run the VM’s vCPU. The
* value is a list of CPU IDs, separated by commas. The CPU IDs are zero-based.
* For example, `0,1,2,3` (which also can be shortened to `0-3`) means that the VM’s vCPUs are run on the first four
* CPU cores. Setting `affinity` is only allowed for `root@pam` authenticated user.
*/
affinity?: string;
/**
* The CPU architecture (defaults to `x8664`).
*/
architecture?: string;
/**
* The number of CPU cores (defaults to `1`).
*/
cores?: number;
/**
* The CPU flags.
* - `+aes`/`-aes` - Activate AES instruction set for HW acceleration.
* - `+amd-no-ssb`/`-amd-no-ssb` - Notifies guest OS that host is not
* vulnerable for Spectre on AMD CPUs.
* - `+amd-ssbd`/`-amd-ssbd` - Improves Spectre mitigation performance with
* AMD CPUs, best used with "virt-ssbd".
* - `+hv-evmcs`/`-hv-evmcs` - Improve performance for nested
* virtualization (only supported on Intel CPUs).
* - `+hv-tlbflush`/`-hv-tlbflush` - Improve performance in overcommitted
* Windows guests (may lead to guest BSOD on old CPUs).
* - `+ibpb`/`-ibpb` - Allows improved Spectre mitigation on AMD CPUs.
* - `+md-clear`/`-md-clear` - Required to let the guest OS know if MDS is
* mitigated correctly.
* - `+pcid`/`-pcid` - Meltdown fix cost reduction on Westmere, Sandy- and
* Ivy Bridge Intel CPUs.
* - `+pdpe1gb`/`-pdpe1gb` - Allows guest OS to use 1 GB size pages, if
* host HW supports it.
* - `+spec-ctrl`/`-spec-ctrl` - Allows improved Spectre mitigation with
* Intel CPUs.
* - `+ssbd`/`-ssbd` - Protection for "Speculative Store Bypass" for Intel
* models.
* - `+virt-ssbd`/`-virt-ssbd` - Basis for "Speculative Store Bypass"
* protection for AMD models.
*/
flags?: string[];
/**
* The number of hotplugged vCPUs (defaults
* to `0`).
*/
hotplugged?: number;
/**
* Limit of CPU usage, `0...128` (supports
* fractional values, e.g. `63.5`). (defaults to `0` -- no limit).
*/
limit?: number;
/**
* Enable/disable NUMA. (default to `false`)
*/
numa?: boolean;
/**
* The number of CPU sockets (defaults to `1`).
*/
sockets?: number;
/**
* The emulated CPU type, it's recommended to
* use `x86-64-v2-AES` (defaults to `qemu64`).
*/
type?: string;
/**
* The CPU units. PVE default is `1024` for cgroups v1 and `100` for cgroups v2.
*/
units: number;
}
export interface VmLegacyDisk {
/**
* The disk AIO mode (defaults to `ioUring`).
*/
aio?: string;
/**
* Whether the drive should be included when making backups (defaults to `true`).
*/
backup?: boolean;
/**
* The cache type (defaults to `none`).
*/
cache?: string;
/**
* The identifier for the datastore to create
* the disk in (defaults to `local-lvm`).
*/
datastoreId?: string;
/**
* Whether to pass discard/trim requests to the
* underlying storage. Supported values are `on`/`ignore` (defaults
* to `ignore`).
*/
discard?: string;
/**
* The file format.
*/
fileFormat: string;
/**
* The file ID for a disk image when importing a disk into VM. The ID format is
* `<datastore_id>:<content_type>/<file_name>`, for example `local:iso/centos8.img`. Can be also taken from
* `proxmoxve.download.FileLegacy` resource. Prefer `importFrom` for uncompressed images.
* Use `fileId` when working with compressed cloud images (e.g., `.qcow2.xz`) that were downloaded
* with `contentType = "iso"` and `decompressionAlgorithm` set. See the
* Create a VM from a Cloud Image guide for examples.
*/
fileId?: string;
/**
* The file ID for a disk image to import into VM. The image must be of `import` content type
* (uncompressed images only). The ID format is `<datastore_id>:import/<file_name>`, for example `local:import/centos8.qcow2`.
* Can be also taken from `proxmoxve.download.FileLegacy` resource. Note: compressed images downloaded with
* `decompressionAlgorithm` cannot use `importFrom`; use `fileId` instead.
*/
importFrom?: string;
/**
* The disk interface for Proxmox, currently `scsi`,
* `sata` and `virtio` interfaces are supported. Append the disk index at
* the end, for example, `virtio0` for the first virtio disk, `virtio1` for
* the second, etc.
*/
interface: string;
/**
* Whether to use iothreads for this disk (defaults
* to `false`).
*/
iothread?: boolean;
/**
* The in-datastore path to the disk image.
* ***Experimental.***Use to attach another VM's disks,
* or (as root only) host's filesystem paths (`datastoreId` empty string).
* See "*Example: Attached disks*".
*/
pathInDatastore: string;
/**
* The number of I/O queues for this disk, `2` or
* greater. Only supported for SCSI disks, and applied by Proxmox only
* when `scsiHardware` is set to `virtio-scsi-single`. A change requires
* a VM power cycle (or reboot via the Proxmox API) to take effect.
*/
queues?: number;
/**
* Whether the drive should be considered for replication jobs (defaults to `true`).
*/
replicate?: boolean;
/**
* The serial number of the disk, up to 20 bytes long.
*/
serial?: string;
/**
* The disk size in gigabytes (defaults to `8`).
*/
size: number;
/**
* The speed limits.
*/
speed?: outputs.VmLegacyDiskSpeed;
/**
* Whether to use an SSD emulation option for this disk (
* defaults to `false`). Note that SSD emulation is not supported on VirtIO
* Block drives.
*/
ssd?: boolean;
}
export interface VmLegacyDiskSpeed {
/**
* The maximum read I/O in operations per second.
*/
iopsRead?: number;
/**
* The maximum unthrottled read I/O pool in operations per second.
*/
iopsReadBurstable?: number;
/**
* The maximum write I/O in operations per second.
*/
iopsWrite?: number;
/**
* The maximum unthrottled write I/O pool in operations per second.
*/
iopsWriteBurstable?: number;
/**
* The maximum read speed in megabytes per second.
*/
read?: number;
/**
* The maximum burstable read speed in
* megabytes per second.
*/
readBurstable?: number;
/**
* The maximum write speed in megabytes per second.
*/
write?: number;
/**
* The maximum burstable write speed in
* megabytes per second.
*/
writeBurstable?: number;
}
export interface VmLegacyEfiDisk {
/**
* The identifier for the datastore to create
* the disk in (defaults to `local-lvm`).
*/
datastoreId?: string;
/**
* The file format (defaults to `raw`).
*/
fileFormat: string;
/**
* Use am EFI vars template with
* distribution-specific and Microsoft Standard keys enrolled, if used with
* EFI type=`4m`. Ignored for VMs with cpu.architecture=`aarch64` (defaults
* to `false`).
*/
preEnrolledKeys?: boolean;
/**
* Size and type of the OVMF EFI disk. `4m` is newer and
* recommended, and required for Secure Boot. For backwards compatibility
* use `2m`. Ignored for VMs with cpu.architecture=`aarch64` (defaults
* to `2m`).
*/
type?: string;
}
export interface VmLegacyHostpci {
/**
* The PCI device name for Proxmox, in form
* of `hostpciX` where `X` is a sequential number from 0 to 15.
*/
device: string;
/**
* The PCI device ID. This parameter is not compatible
* with `apiToken` and requires the root `username` and `password`
* configured in the proxmox provider. Use either this or `mapping`.
*/
id?: string;
/**
* The resource mapping name of the device, for
* example gpu. Use either this or `id`.
*/
mapping?: string;
/**
* The mediated device ID to use.
*/
mdev?: string;
/**
* Tells Proxmox to use a PCIe or PCI port. Some
* guests/device combination require PCIe rather than PCI. PCIe is only
* available for q35 machine types.
*/
pcie?: boolean;
/**
* A path to a ROM file for the device to use. This
* is a relative path under `/usr/share/kvm/`.
*/
romFile?: string;
/**
* Makes the firmware ROM visible for the VM (defaults
* to `true`).
*/
rombar?: boolean;
/**
* Marks the PCI(e) device as the primary GPU of the VM.
* With this enabled the `vga` configuration argument will be ignored.
*/
xvga?: boolean;
}
export interface VmLegacyInitialization {
/**
* The identifier for the datastore to create the
* cloud-init disk in (defaults to `local-lvm`).
*/
datastoreId?: string;
/**
* The DNS configuration.
*/
dns?: outputs.VmLegacyInitializationDns;
/**
* The file format.
*/
fileFormat: string;
/**
* The hardware interface to connect the cloud-init
* image to. Must be one of `ide0..3`, `sata0..5`, `scsi0..30`. Will be
* detected if the setting is missing but a cloud-init image is present,
* otherwise defaults to `ide2`.
*/
interface?: string;
/**
* The IP configuration (one block per network
* device).
*/
ipConfigs?: outputs.VmLegacyInitializationIpConfig[];
/**
* The identifier for a file containing
* all meta data passed to the VM via cloud-init.
*/
metaDataFileId: string;
/**
* The identifier for a file containing
* network configuration data passed to the VM via cloud-init (conflicts
* with `ipConfig`).
*/
networkDataFileId: string;
/**
* The cloud-init configuration format
*/
type: string;
/**
* Whether to do an automatic package upgrade after
* the first boot (defaults to `true`).
* Setting this is only allowed for `root@pam` authenticated user.
*/
upgrade: boolean;
/**
* The user account configuration (conflicts
* with `userDataFileId`).
*/
userAccount?: outputs.VmLegacyInitializationUserAccount;
/**
* The identifier for a file containing
* custom user data (conflicts with `userAccount`).
*/
userDataFileId: string;
/**
* The identifier for a file containing
* all vendor data passed to the VM via cloud-init.
*/
vendorDataFileId: string;
}
export interface VmLegacyInitializationDns {
/**
* The DNS search domain.
*/
domain?: string;
/**
* The list of DNS servers.
*/
servers?: string[];
}
export interface VmLegacyInitializationIpConfig {
/**
* The IPv4 configuration.
*/
ipv4?: outputs.VmLegacyInitializationIpConfigIpv4;
/**
* The IPv6 configuration.
*/
ipv6?: outputs.VmLegacyInitializationIpConfigIpv6;
}
export interface VmLegacyInitializationIpConfigIpv4 {
/**
* The IPv4 address in CIDR notation
* (e.g. 192.168.2.2/24). Alternatively, set this to `dhcp` for
* autodiscovery.
*/
address?: string;
/**
* The IPv4 gateway (must be omitted
* when `dhcp` is used as the address).
*/
gateway?: string;
}
export interface VmLegacyInitializationIpConfigIpv6 {
/**
* The IPv6 address in CIDR notation
* (e.g. fd1c::7334/64). Alternatively, set this
* to `dhcp` for DHCPv6, or `auto` for SLAAC.
*/
address?: string;
/**
* The IPv6 gateway (must be omitted
* when `dhcp` or `auto` are used as the address).
*/
gateway?: string;
}
export interface VmLegacyInitializationUserAccount {
/**
* The SSH keys.
*/
keys?: string[];
/**
* The SSH password.
*/
password?: string;
/**
* The SSH username.
*/
username?: string;
}
export interface VmLegacyMemory {
/**
* The dedicated memory in megabytes (defaults to `512`).
*/
dedicated?: number;
/**
* The floating memory in megabytes. The default is `0`, which disables "ballooning device" for the VM.
* Please note that Proxmox has ballooning enabled by default. To enable it, set `floating` to the same value as `dedicated`.
* See [Proxmox documentation](https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_memory) section 10.2.6 for more information.
*/
floating?: number;
/**
* Enable/disable hugepages memory (defaults to disable).
*/
hugepages?: string;
/**
* Keep hugepages memory after the VM is stopped (defaults to `false`).
*
* Settings `hugepages` and `keepHugepages` are only allowed for `root@pam` authenticated user.
* And required `cpu.numa` to be enabled.
*/
keepHugepages?: boolean;
/**
* The shared memory in megabytes (defaults to `0`).
*/
shared?: number;
}
export interface VmLegacyNetworkDevice {
/**
* The name of the network bridge (defaults to `vmbr0`).
*/
bridge?: string;
/**
* Whether to disconnect the network device from the network (defaults to `false`).
*/
disconnected?: boolean;
/**
* Whether to enable the network device (defaults to `true`). Remove the `networkDevice` block from your configuration instead of setting `enabled = false`.
*
* @deprecated The `enabled` attribute is deprecated and will be removed in a future release. Remove the `networkDevice` block from your configuration instead of setting `enabled = false`.
*/
enabled?: boolean;
/**
* Whether this interface's firewall rules should be used (defaults to `false`).
*/
firewall?: boolean;
/**
* The MAC address.
*/
macAddress: string;
/**
* The network device model (defaults to `virtio`).
*/
model?: string;
/**
* Force MTU, for VirtIO only. Set to 1 to use the bridge MTU. Cannot be larger than the bridge MTU.
*/
mtu?: number;
/**
* The number of queues for VirtIO (1..64).
*/
queues?: number;
/**
* The rate limit in megabytes per second.
*/
rateLimit?: number;
/**
* String containing a `;` separated list of VLAN trunks
* ("10;20;30"). Note that the VLAN-aware feature need to be enabled on the PVE
* Linux Bridge to use trunks.
*/
trunks?: string;
/**
* The VLAN identifier.