Upgrade Guide¶
This guide documents breaking changes across provider versions and the recommended upgrade process.
General upgrade process¶
-
Pin the current version in your
required_providersblock: -
Review the CHANGELOG for all versions between your current and target versions. Pay special attention to entries marked BREAKING CHANGES.
-
Update the version constraint to the target version.
-
Run
terraform init -upgradeto download the new provider. -
Run
terraform planand review the output. Look for unexpected resource recreation or attribute changes. -
Apply when satisfied.
Info
Tip: Upgrade one minor version at a time when crossing multiple breaking changes. This makes it easier to isolate issues.
v0.124.0¶
VM and container create and clone no longer adopt an existing guest¶
Creating or cloning a VM or container (proxmox_virtual_environment_vm, proxmox_vm, proxmox_virtual_environment_vm2, proxmox_cloned_vm, proxmox_virtual_environment_cloned_vm or proxmox_virtual_environment_container) with a vm_id or id that another guest already holds now fails with Proxmox VE's refusal: already exists, or config file already exists for a clone on the same node. Before, the apply succeeded and silently took over the other guest, so a later destroy deleted a guest that Terraform never created. A clone with proxmox_virtual_environment_vm did so only with clone.retries above 1. Guests already in state are not affected.
Action required: If an apply fails because the ID is taken, pick a free ID, or import the guest with the ID {node}/{vm_id}, for example:
With an automatic ID, another client may have taken it between the lookup and the create, so run the apply again.
v0.123.0¶
Container mount_point.volume change to another volume ID is applied¶
When you change mount_point.volume of a proxmox_virtual_environment_container from one volume ID to another, for example from local-lvm:vm-100-disk-1 to local-lvm:vm-100-disk-9, the provider now applies the change. The container is updated in place: the new volume is mounted at that mount point, and the old volume is not deleted. It stays on the datastore and is listed as an unused volume of the container.
Before, a change between two volumes on the same datastore was ignored without any warning. The plan showed no change to volume, and if you changed something else in the same block, such as path, it was applied to the old volume.
What you see after upgrading depends on your configuration:
volumeis a datastore ID (local-lvm), or the ID of the volume that is mounted now: nothing changes.volumeis the ID of a different volume than the one that is mounted now: the next plan shows an in-place update that mounts the volume from your configuration. Applying it restarts the container if it is running.sizediffers from the real size of a volume mounted by its ID: the plan no longer replaces the container. Proxmox VE always keeps the real size of an existing volume, so the plan shows an in-place change tosizeevery time until you correct the value, and every apply restarts the container if it is running.
Action required: Review the plan before applying.
- To keep the volume that is mounted now, set
volumeto the ID from the state (terraform state show, attributepath_in_datastore). - To switch to the other volume, check that it exists first. Proxmox VE accepts the ID of a volume that does not exist, and the container then fails to start. Also set
sizeto the real size of that volume.
v0.122.0¶
Container rootfs replicate defaults to true¶
The disk.replicate attribute of proxmox_virtual_environment_container now defaults to true, as documented and as Proxmox VE does, and replicate = false is applied on create. Before, the provider default was false but was never sent on create, so new containers were replicated while the state showed false, and replicate = false only took effect after a later change to the disk block.
After upgrading, a container that does not set replicate and whose rootfs has replicate=0 in Proxmox VE (for example after a disk change with the old default) plans an update to replicate = true. Other containers show no change.
Action required: To keep the rootfs out of replication jobs, set replicate = false in the disk block before applying.
Container cpu.cores no longer defaults to 1¶
The cpu.cores attribute of proxmox_virtual_environment_container no longer defaults to 1. A container created without cores now has no cores setting in Proxmox VE and can use all host cores, which is the Proxmox VE default. Before, the provider always sent cores, as 1 when it was not configured, so a container limited by cpu.limit alone could not be described, and any change to its cpu block pinned it to one core.
Existing containers keep their current cores value and show no change after upgrading. Removing cores from the configuration no longer resets it to 1: the container keeps its current value. Set cores = 0 to remove the setting from an existing container. A clone whose cpu block does not set cores now keeps the value of its source container, before it was set to 1. The upper bound is now 8192, as in Proxmox VE.
Action required: To keep new containers on a single core, set it explicitly:
Container cpu.units not in the configuration is removed¶
A container that does not set cpu.units but has cpuunits in Proxmox VE, for example one created with a provider version before v0.102.0 (which always sent 1024), planned the removal of its cpu block on every run, and the apply changed nothing. The apply now removes cpuunits from the container, so Proxmox VE uses its own default (100 on cgroup2) and the next plan is empty. The cores value of such a container is not changed.
Action required: To keep the current weight, set it explicitly, for example units = 1024 in the cpu block, before applying.
v0.121.0¶
proxmox_acl no longer adopts an existing ACL¶
Creating a proxmox_acl (or proxmox_virtual_environment_acl) for a path, role and user, group or token that already has an ACL entry now fails with Unable to Create ACL, saying the ACL already exists. Before, the create succeeded and silently took over the existing entry, so a later destroy removed an ACL that Terraform never created. ACLs already in state are not affected.
Action required: If an apply fails because the ACL already exists, import the ACL with the ID shown in the error ({path}?{group|user@realm|user@realm!token}?{role}), for example:
Container wait_for_ip waits after start¶
When wait_for_ip is set on a proxmox_virtual_environment_container, creating it, and any update that starts or reboots it, now waits for the configured address for up to the new wait_for_ip.timeout (default 5m). Before, only refresh waited, for up to 10 seconds. Refresh is unchanged, and no plan changes.
If the wait_for_ip condition is never met, for example ipv4 = true on a container without IPv4, those applies now take up to timeout longer and end with a warning.
Action required: None for containers that get their address. Otherwise, fix the wait_for_ip condition, lower wait_for_ip.timeout, or remove the block.
v0.120.0¶
Imported VMs record a TPM, EFI disk and AMD SEV on default settings¶
Importing a proxmox_virtual_environment_vm now records tpm_state, efi_disk and amd_sev whenever the VM has them. Before, a TPM on local-lvm at v2.0, an EFI disk on local-lvm with the default type and format, or AMD SEV with all default options was left out of state, so declaring it planned a new device, an empty one for the TPM and EFI disk. Devices on other settings were already recorded.
This only affects new imports. A configuration without these blocks now plans to remove the TPM, EFI disk or AMD SEV after an import, the same as for a regular disk.
Action required: After importing a VM, declare its tpm_state, efi_disk and amd_sev blocks, or generate them with -generate-config-out, before applying.
Imported VMs record a CD-ROM on any interface¶
Importing a proxmox_virtual_environment_vm now records a cdrom block for the CD-ROM drive on whichever interface Proxmox reports it, for example ide2, the GUI default. Before, only a CD-ROM on ide3 was recorded, so declaring an existing drive planned a new one. Cloud-init drives are not reported as cdrom.
This only affects new imports. A configuration without a cdrom block now plans a cdrom change after an import.
Action required: After importing a VM, declare its cdrom block, or generate it with -generate-config-out, before applying.
v0.119.0¶
proxmox_ceph_pool no longer manages storages¶
The experimental proxmox_ceph_pool no longer creates or removes RBD storages: add_storages and remove_storages are removed. Pools are always created without a storage, and destroying a pool never removes a storage. RBD storages are managed by the new proxmox_storage_rbd resource. This also fixes importing a pool, which used to plan an update, or a replacement when add_storages was set.
Before:
After:
resource "proxmox_ceph_pool" "vm" {
node_name = "pve"
name = "vm"
}
import {
to = proxmox_storage_rbd.vm
id = "vm" # add_storages named the storage after the pool
}
resource "proxmox_storage_rbd" "vm" {
id = "vm"
pool = proxmox_ceph_pool.vm.name # for an erasure-coded pool: metadata_pool_name
# data_pool = proxmox_ceph_pool.vm.data_pool.name # erasure-coded pools only
content = ["images", "rootdir"]
}
Action required: Remove add_storages and remove_storages from your configuration. A storage that add_storages already created keeps working; to manage it, import it as a proxmox_storage_rbd as shown above. Destroy storages through their own resources: destroying the pool leaves them in place.
proxmox_ceph_pool.remove_ecprofile removed¶
The erasure code profile of an erasure-coded pool is removed with the pool if Proxmox generated it (no erasure_coding.profile set), and kept if the pool named an existing profile.
Action required: Remove remove_ecprofile from your configuration.
proxmox_ceph_pool.erasure_coding is now an object¶
erasure_coding is an object with k, m, failure_domain, device_class and profile attributes, instead of Proxmox's k=<int>,m=<int>,... string. With erasure_coding, Proxmox creates the pools <name>-data and <name>-metadata rather than a pool named name, and the provider now reads both.
Before:
After:
Action required: Rewrite erasure_coding as an object. No existing state holds the string form, because creating an erasure-coded pool always failed before this version.
File ID and disk serial validation tightened¶
File IDs (<datastore_id>:<content_type>/<file_name>) can no longer contain whitespace, , or =. This applies to proxmox_virtual_environment_vm (disk.file_id, disk.import_from, cdrom.file_id, the initialization *_data_file_id attributes), the proxmox_virtual_environment_container template file_id, cdrom.file_id on proxmox_vm and proxmox_cloned_vm, and disk.import_from on proxmox_cloned_vm, which also accepts an absolute path.
Disk serial on proxmox_virtual_environment_vm and proxmox_cloned_vm may only contain letters, digits and -%_.!~*'(), up to 20 characters.
Proxmox VE rejects these values anyway, so such a configuration already failed at apply time. A , in serial could also set other disk options silently. Now the error shows up at plan time.
Action required: Rename any file whose name contains whitespace, , or =, and update the file IDs that point to it. Remove other characters from disk serial values.
v0.118.0¶
SDN zone mtu can be removed¶
The mtu attribute on the SDN zone resources (proxmox_sdn_zone_simple, proxmox_sdn_zone_vlan, proxmox_sdn_zone_qinq, proxmox_sdn_zone_vxlan, proxmox_sdn_zone_evpn and their proxmox_virtual_environment_* aliases) is no longer computed. Removing it from the configuration now removes it from the zone, and the zone goes back to the Proxmox default.
Before: Once set, mtu could not be removed. If mtu was not in the configuration, Terraform kept whatever value the zone had, including values set outside Terraform.
After: If mtu is not in the configuration, Terraform plans to remove it from the zone (mtu = 1450 -> null), and apply deletes it. Like any other SDN change, it takes effect after the SDN configuration is applied.
Action required: Run terraform plan after upgrading. If it shows mtu being removed from a zone where you want to keep it, add mtu to that zone's configuration.
SDN peers validation tightened¶
The peers attribute on proxmox_sdn_zone_vxlan, proxmox_sdn_controller_evpn and proxmox_sdn_controller_bgp is now validated at plan time:
peers = []is rejected. Before, it was accepted but sent nothing, so Proxmox kept the previous peers.- Every entry must be a plain IPv4 or IPv6 address (no CIDR suffix, no hostname). Before, invalid entries were only rejected by Proxmox at apply time.
Action required: If you set peers = [] (for example on an EVPN controller that uses fabric), remove the peers attribute instead. Replace any entry that is not a plain IP address.
file file_name validation tightened¶
The file_name attribute in the source_file and source_raw blocks of proxmox_virtual_environment_file must now be a plain file name. Values containing path separators (/, \), whitespace, or the special entries . and .. are rejected at plan time. The same rule applies to a file name derived from source_file.path when file_name is not set.
Proxmox VE itself cannot address a volume whose name contains whitespace: the API upload silently replaces spaces with _, and the delete endpoint refuses such a volume ID. So a resource with whitespace in its name could never be destroyed by the provider.
Action required: Rename any file with whitespace or path separators in file_name. If such a resource already exists in state, remove it with terraform state rm and delete the file on the node manually, then re-create it under the new name.
v0.109.0¶
vm agent.wait_for_ip.enabled replaced by agent.wait_for_ip.disabled¶
The agent.wait_for_ip.enabled attribute on proxmox_virtual_environment_vm (introduced in v0.108.0) has been replaced by agent.wait_for_ip.disabled with inverted semantics. The previous attribute defaulted to true, which caused ipv4_addresses, ipv6_addresses, and network_interface_names to become empty on refresh/plan for VMs created before v0.108.0: their stored state had no value for the new switch, so it read back as false ("disabled") and the provider skipped the agent IP lookup.
Before (v0.108.0):
After (v0.109.0):
The new switch defaults to false (do not skip), so its zero value preserves the original behavior — VMs upgraded from any earlier version keep reading IP addresses from the guest agent without any configuration change.
Action required: Only if you set wait_for_ip.enabled = false (added in v0.108.0). Replace it with wait_for_ip.disabled = true. The stale enabled value in state is dropped automatically. If you never set wait_for_ip.enabled, no action is needed and the ipv4_addresses/ipv6_addresses regression is resolved.
v0.102.0¶
proxmox_metrics_server.disable now defaults to false¶
The disable attribute on proxmox_metrics_server (and its alias proxmox_virtual_environment_metrics_server) now has a schema default of false. The Proxmox API omits disable from GET responses when the value is false, and the resource now reads state back from the API after Create and Update — so the default is required to keep state consistent.
Before: When disable was not set in configuration, it was stored as null in state.
After: When disable is not set in configuration, it is stored as false in state. This matches the Proxmox server default (metrics servers are enabled by default).
Action required: None. On the first terraform apply after upgrading, Terraform may show a one-time diff of disable: null -> false for existing metrics server resources that did not set disable. The apply is a no-op against the Proxmox API.
LXC cpu.units no longer defaults to 1024¶
The cpu.units attribute on proxmox_virtual_environment_container no longer defaults to 1024. Instead, the Proxmox server's own default is used (100 on cgroup2, 1024 on cgroup1).
Before: When cpu.units was not specified, the provider always sent cpuunits=1024 to the API, overriding the server default.
After: When cpu.units is not specified, the provider does not send cpuunits at all, letting the server use its own default.
Action required: If you rely on cpu.units = 1024 and are on a cgroup2 system, explicitly set it in your configuration:
v0.101.0¶
VM datasources error on not-found¶
Both VM datasources now return an error when the specified VM does not exist, instead of silently returning empty or broken state.
- Framework (
proxmox_virtual_environment_vm2/proxmox_vm): Was previously non-functional (Value Conversion Erroron every call). Now works correctly but errors on missing VMs. - SDK (
proxmox_virtual_environment_vm): Previously returned an unclear raw error. Now returns a proper "not found" diagnostic. This datasource is also now deprecated in favor ofproxmox_vm.
Action required: If your configuration depends on a VM datasource not erroring when the VM doesn't exist, switch to the proxmox_virtual_environment_vms list datasource — it returns an empty list when no VMs match. Note that this datasource supports filtering by name, template, status, and node_name, but not by vm_id directly. To find a specific VM by ID, post-filter the results:
data "proxmox_virtual_environment_vms" "all" {
node_name = "pve"
}
locals {
my_vm = [for vm in data.proxmox_virtual_environment_vms.all.vms : vm if vm.vm_id == 999]
}
v0.100.0¶
template attribute no longer forces recreation¶
The template attribute on proxmox_virtual_environment_vm no longer forces resource recreation. Converting a VM to a template (or back) now happens in-place.
Before: Changing template = true caused Terraform to destroy and recreate the VM.
After: The conversion is applied in-place without recreation.
Action required: If you relied on the destroy-and-recreate behavior (for example, to get a fresh VM when toggling template), you may need to use terraform taint or add a replace_triggered_by lifecycle rule.
Shutdown operations fail when reboot_after_update = false¶
Operations that require a VM shutdown — TPM state migration, cloud-init disk move, template conversion, and disk move — now fail with an error when reboot_after_update = false, instead of silently powering off the VM.
Before: The provider would silently shut down a running VM even when reboot_after_update = false.
After: The provider returns an error, respecting the reboot_after_update = false setting.
Action required: If you perform operations that require a shutdown (TPM, cloud-init move, template conversion, disk move), either:
- Set
reboot_after_update = true(default), or - Shut down the VM before applying changes
Short-name resource aliases (proxmox_* prefix)¶
All existing Framework resources now have shorter aliases using the proxmox_ prefix instead of proxmox_virtual_environment_. Both names work simultaneously — the old names emit a deprecation warning. New resources added from v0.99.0 onward (such as proxmox_backup_job) use the short prefix exclusively. See ADR-007 for full details.
Examples of the new short names:
| Old name | New name |
|---|---|
proxmox_virtual_environment_vm2 (resource) |
proxmox_vm |
proxmox_virtual_environment_download_file |
proxmox_download_file |
proxmox_virtual_environment_network_linux_bridge |
proxmox_network_linux_bridge |
proxmox_virtual_environment_hagroup |
proxmox_hagroup |
proxmox_virtual_environment_acl |
proxmox_acl |
Action required: No immediate action needed — old names continue to work. To migrate at your own pace, use Terraform's moved block (requires Terraform >= 1.8):
moved {
from = proxmox_virtual_environment_network_linux_bridge.example
to = proxmox_network_linux_bridge.example
}
Then update the resource block to use the new name. After a successful terraform apply, the moved block can be removed.
For Terraform < 1.8, use terraform state mv:
v0.98.1¶
network_device.enabled deprecated¶
The enabled attribute on the network_device block in proxmox_virtual_environment_vm is deprecated and will be removed in a future release.
Action required:
- If you use
enabled = true(or rely on the default): remove theenabledline — the device is enabled by default. - If you use
enabled = falseto disable a device: remove the entirenetwork_deviceblock instead.
# Before
resource "proxmox_virtual_environment_vm" "example" {
# ...
network_device {
bridge = "vmbr0"
enabled = true # drop this line
}
}
# After
resource "proxmox_virtual_environment_vm" "example" {
# ...
network_device {
bridge = "vmbr0"
}
}
v0.97.1¶
VM and container name validation¶
The name attribute on proxmox_virtual_environment_vm and the hostname in proxmox_virtual_environment_container initialization block now validate that the value is a valid DNS name. Previously, invalid names were accepted by Terraform and rejected at apply time by the Proxmox API.
Action required: If you have VMs or containers with names that are not valid DNS names (for example, names starting with . or containing special characters), update them to valid DNS names.
v0.95.0¶
Node data source cpu_count fix¶
The proxmox_virtual_environment_node and proxmox_virtual_environment_nodes data sources returned inconsistent values for cpu_count. This has been corrected so both return the same value.
Action required: If you depend on the previous (incorrect) value in expressions or outputs, update downstream references.
v0.92.0¶
download_file Content-Length checking restored¶
The proxmox_virtual_environment_download_file resource now checks the upstream URL's Content-Length during every refresh when overwrite = true (the default). This restores original behavior from v0.33.0 that was accidentally removed in v0.78.2.
Before (v0.78.2–v0.91.x): No upstream check — Terraform would not detect if the remote file had changed.
After (v0.92.0+): Terraform detects upstream changes and triggers re-download.
Action required: If you intentionally want to skip upstream checking (for example, with URLs that don't return Content-Length), set overwrite = false:
firewall_options validation tightened¶
The proxmox_virtual_environment_firewall_options resource now requires exactly one of vm_id or container_id at validation time.
Before: Configurations with only node_name would pass validation but fail at runtime.
After: Terraform rejects the configuration during plan with a clear error.
Action required: Ensure your firewall_options resources specify either vm_id or container_id.
v0.89.0¶
cpu.units default reverted¶
The cpu.units attribute default was reverted to use the PVE server default instead of a provider-set value.
Before: The provider set cpu.units = 1024 explicitly.
After: The provider omits cpu.units from API calls unless you set it, letting the PVE server use its own default.
Action required: If you rely on cpu.units = 1024, set it explicitly in your configuration:
v0.75.0¶
Removed deprecated initialization attributes¶
Two deprecated attributes were removed from the proxmox_virtual_environment_vm resource:
initialization.dns.server(singular) — useinitialization.dns.servers(plural)initialization.upgrade— removed entirely
Before:
resource "proxmox_virtual_environment_vm" "example" {
# ...
initialization {
dns {
server = "1.1.1.1"
}
upgrade = true
}
}
After:
resource "proxmox_virtual_environment_vm" "example" {
# ...
initialization {
dns {
servers = ["1.1.1.1", "8.8.8.8"]
}
}
}
datastores data source restructured¶
The proxmox_virtual_environment_datastores data source uses a new structured format with filters.
Action required: Review the datastores data source documentation and update your configuration to the new format.
v0.74.0¶
Disk behavior in clone operations¶
Disk management during clone operations was both clarified in documentation and fixed in code — disks moved during a VM clone are now handled correctly during subsequent updates.
Action required: If you clone VMs and then modify disk configuration, verify that updates behave as expected. Review the Clone VM guide for current disk handling semantics.
v0.69.0¶
cpu.architecture handling improved¶
The cpu.architecture attribute handling was improved. Previously, some architecture values were not handled correctly.
Action required: If you set cpu.architecture explicitly, verify that your configuration still produces the expected result after upgrading.
v0.65.0¶
vga.enabled removed¶
The deprecated vga.enabled attribute was removed from the proxmox_virtual_environment_vm resource.
Action required: Remove enabled from any vga blocks. To disable VGA, omit the vga block entirely or configure it with type = "none".
Earlier versions¶
| Version | Breaking change | Action |
|---|---|---|
| v0.48.0 | File snippets now upload via SSH input stream instead of SCP | No config change; ensure SSH connectivity to nodes |
| v0.40.0 | LXC features block is now updatable; mount type support added |
Review LXC features blocks — previously ignored updates now apply |
| v0.4.0 | disk.interface is now required |
Add interface to all disk blocks |
| v0.2.0 | cloud_init renamed to initialization; os_type renamed to operating_system.type |
Rename attributes in configuration |