Upgrade to proxmox_virtual_environment_download_file
in a non-destructive way
#1000
Labels
🐛 bug
Something isn't working
Describe the bug
I'm trying to migrate from
proxmox_virtual_environment_file
to the recently addedproxmox_virtual_environment_download_file
, and of course, also the resources that depend on it.I would like to do this in a non-destructive way, but unfortunately I still couldn't manage to do so.
The steps of what I'm trying are described below, and also the final
terraform plan
that suggests destructive changes.To Reproduce
Steps to reproduce the behavior:
Remove from
state
resources that depend onproxmox_virtual_environment_file
:terraform state rm proxmox_virtual_environment_container.renovate
On code, remove
proxmox_virtual_environment_file
and addproxmox_virtual_environment_download_file
On code, comment out resources that depend on
proxmox_virtual_environment_file
(i.e.proxmox_virtual_environment_container.renovate
)Run
terraform apply
Notice that the only change here is the destruction on
proxmox_virtual_environment_file
and creation ofproxmox_virtual_environment_download_file
On code, undo changes of step 3, by uncommenting those resources (i.e.
proxmox_virtual_environment_container.renovate
)On code, update references on those resources (i.e.
proxmox_virtual_environment_container.renovate
) fromproxmox_virtual_environment_file
toproxmox_virtual_environment_download_file
Import resources that depend now depend on
proxmox_virtual_environment_download_file
:terraform import proxmox_virtual_environment_container.renovate pve-prod/5523
terraform plan
Notice that the generated plan will recreate
proxmox_virtual_environment_container.renovate
(below is its output)Please also provide a minimal Terraform configuration that reproduces the issue.
terraform plan
output:renovate.tf
Expected behavior
Machines did not have to be recreated
TF_LOG=DEBUG terraform apply
): Not neededThe text was updated successfully, but these errors were encountered: