You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When setting the machine value to “pc” in the resource configuration, the first tofu apply does not save the machine value in the state file. Running tofu plan after the first apply still shows changes to set the machine value. After the second tofu apply, the machine value is finally saved to the state.
To Reproduce
Create a resource with the following configuration:
bpg
changed the title
Machine value not saved in state after first tofu apply for proxmox_virtual_environment_vm resource
Machine value not saved in state after first tofu apply for proxmox_virtual_environment_vm resource when clonning
Oct 15, 2024
This can be a very frustrating issue when moving to production, as it might require rebooting all your provisioned vm_qemu hosts. We’ve already been impacted by this, with all MongoDB cluster nodes restarting together.
Describe the bug
When setting the machine value to “pc” in the resource configuration, the first tofu apply does not save the machine value in the state file. Running tofu plan after the first apply still shows changes to set the machine value. After the second tofu apply, the machine value is finally saved to the state.
To Reproduce
Run tofu apply.
Run tofu plan, observe that the machine value still shows as needing to be applied.
Run tofu apply again.
Observe that the machine type is now recorded in the state.
Create a resource '....'
Run '....'
See error
Modify the resource '....'
Run '....'
See error
Please also provide a minimal Terraform configuration that reproduces the issue.
and the output of
terraform|tofu apply
.Expected behavior
I expected the machine value to be saved in the state after the first tofu apply.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
TF_LOG=DEBUG terraform apply
):The text was updated successfully, but these errors were encountered: