-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openstack_compute_instance_v2 block_device not removed. #6473
Comments
@vmorris This is a good catch. It should be possible to add a check in the resource's Update function to return an error rather than accepting the change. |
@jtopjian I have to admit, I'm just learning terraform.. I see the update function but not sure what would be required. I'll defer this until later, or if someone can drop a PR, I'd like to review. Thanks! |
@vmorris I should be able to tackle this in the next week. I'll keep you updated. |
It's definitely possible to add and remove block devices in openstack without recreating the guest.. I could understand doing this if the block device that's being altered is the boot device, but why recreate otherwise? |
The name Unfortunately I'm unable to find good documentation on But if there's not a way to alter the boot / ephemeral volumes, then I think it makes sense to just rebuild the entire instance upon any modification to the |
Hmm, yes thanks for the clarification. |
OK, sounds good. I'm going to proceed with the If it's discovered that boot/ephemeral devices can be cleanly modified after creation, a subsequent patch can be merged that supports it. |
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. |
Terraform Version
Terraform v0.6.16-dev (507ae65)
Affected Resource(s)
Debug Output
https://gist.github.com/vmorris/6ff907bab20c61a4a9a0de093d82c8dd
Expected Behavior
Boot volume should be removed following a destroy.
Actual Behavior
Boot volume persists following a destroy.
Steps to Reproduce
terraform apply
terraform apply
terraform destroy
Comments
This is a complex use case, just getting it documented for posterity. I am not aware of any option in openstack to alter the on-terminate settings post-deploy but the terraform behaviour tends to imply that one could. Probably terraform should just enforce whatever option was set during the first apply that created the instance.
The text was updated successfully, but these errors were encountered: