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
If a VM with external volumes is created and then destroyed, leaving the volumes intact, the state of the volumes is not updated after the vm deletion until a refresh is performed.
Terraform Version
$ terraform -v
Terraform v0.7.0
Affected Resource(s)
The issue affects these resources:
openstack_blockstorage_volume_v1
openstack_compute_instance_v2
Terraform Configuration Files
This issue occurs after modifying the configuration file. The initial configuration is the following
The debug output of the terraform apply command that removes the vm is available in this gist
The terraform state file after the execution of this command is available in this gist
The debug output of the terraform refresh command is available in this gist
The (correct) terraform state file after the execution of this command is available in this gist
Expected Behavior
The command terraform show issued after the removal of the vm should show two volumes not attached to any machine. It should be consistent with the output of the same command after the terraform refresh (assuming no other change happened in the mean time)
Actual Behavior
Issuing terraform show after the deletion of the vm shows two volumes still attached to the vm, which does not exist.
After issuing a terraform refresh the terraform show command shows correctly the two volumes not attached.
Steps to Reproduce
create a config.tf file as described above with 2 volumes and 1 vm
The issue is also there if you put back the VM into the configuration file and perform an apply.
The VM is correctly spawned using the two volumes but the successive terraform show does not show the volumes are attached. Still a terraform refresh fixes the state.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 23, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
If a VM with external volumes is created and then destroyed, leaving the volumes intact, the state of the volumes is not updated after the vm deletion until a refresh is performed.
Terraform Version
Affected Resource(s)
The issue affects these resources:
Terraform Configuration Files
This issue occurs after modifying the configuration file. The initial configuration is the following
after applying this configuration remove the VM obtaining:
Debug Output
The debug output of the
terraform apply
command that removes the vm is available in this gistThe terraform state file after the execution of this command is available in this gist
The debug output of the
terraform refresh
command is available in this gistThe (correct) terraform state file after the execution of this command is available in this gist
Expected Behavior
The command
terraform show
issued after the removal of the vm should show two volumes not attached to any machine. It should be consistent with the output of the same command after theterraform refresh
(assuming no other change happened in the mean time)Actual Behavior
Issuing
terraform show
after the deletion of the vm shows two volumes still attached to the vm, which does not exist.After issuing a
terraform refresh
theterraform show
command shows correctly the two volumes not attached.Steps to Reproduce
terraform apply
terraform apply
terraform show
terraform refresh
terraform show
References
Might refer to:
The text was updated successfully, but these errors were encountered: