Fix 1079 & 1139 - #1212
Conversation
|
it seems like linting is not ok on main branch |
|
@GullapalliAkhil @Haroon-Dweikat-Ntx Please let me know if any changes are required |
|
Hi @kvandenhoute, thank you for taking the time to work on this and submit a PR to address these issues! While we understand the underlying problem with the VM deletion failing due to attached Volume Groups, we won't be able to merge this specific approach. Adding the automatic disassociation logic to the VM deletion path goes against standard Terraform guidelines. Relationships and attachments should be managed by their specific attachment resources to maintain proper state and lifecycle management, rather than building that logic into the core VM resource itself. To manage Volume Group attachments correctly, users should use the dedicated Because of this, I'll be closing this PR, but we really appreciate your contribution and effort here! |
|
I feel you are contradicting yourself? You suggest us to use the adfs_volume_group_reference directly on the vm resource here: #1139 (comment) In this comment you literally say to not split the attach from the vm:
This PR fixes that you can actually do that, because this feature is currently bugged, confirmed on the other PR too: #1079 (comment) Our original solution is to use the "nutanix_volume_group_vm_v2", which is exactly why we opened the PR: it does not work. Now you say you can not actually use this feature (then why is it available even?), and we should go back to our original solution, which does not work. Please, with terraform provider 2.4.2 try yourself to create: Now try: Neither of the two solutions work for all A,B,C,D. Using the adfs_volume_group_reference on nutanix_vm_v2 won't allow A/B, it does work for C/D Please reinvestigate these issues, as currently the provider is not workable with volumegroups. I don't agree that this is anti-terraform, but if you'd like a detach flag could be added; Please do not close this. |
|
Hi @kvandenhoute, First, I want to sincerely apologize for the mixed messaging here. You are absolutely right to call out the contradiction, and I completely understand how frustrating it is to be sent back and forth, especially after you put in the time and effort to build a fix for us. You have summarized the current broken state perfectly:
When looking at this from a Terraform architecture perspective, the standalone resource ( The good news is that we are actively working on a fix for the underlying drift issue, targeted for our next release (2.5.0). With this fix, the VM resource will no longer show a diff on Thank you again for holding us accountable and for your deep dive into these use cases. We really appreciate your patience while we get this properly resolved. |
|
@Haroon-Dweikat-Ntx Ok that is great to hear, I'm looking forward to it being resolved. I do fail to understand why the inline adfs_volume_group_reference then exists, if its purpose is not to use it. Maybe it should be removed, or documented that this feature is not advised to be used. |
Detach volumegroup that is attached on vm, before destroying the vm. Prismc does not allow to delete vm with attached volumegroup
fixes #1079 & #1139