-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fix deletion of Guacamole VM in stopped state #4245
base: main
Are you sure you want to change the base?
Conversation
Fixes microsoft#4135 Add `skip_shutdown_and_force_delete` configuration to Guacamole VM templates to fix deletion issue. * Modify `main.tf` files in `templates/workspace_services/guacamole/user_resources/guacamole-azure-export-reviewvm/terraform`, `guacamole-azure-import-reviewvm/terraform`, `guacamole-azure-linuxvm/terraform`, and `guacamole-azure-windowsvm/terraform` to include `skip_shutdown_and_force_delete = true` under the `virtual_machine` block in the `features` section. * Update `porter.yaml` files in `templates/workspace_services/guacamole/user_resources/guacamole-azure-export-reviewvm`, `guacamole-azure-import-reviewvm`, `guacamole-azure-windowsvm`, and `guacamole-azure-linuxvm` to increment the version numbers. * Update `CHANGELOG.md` to include the fix for the deletion issue. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/AzureTRE/issues/4135?shareId=XXXX-XXXX-XXXX-XXXX).
…m/microsoft/AzureTRE into marrobi/fix-guacamole-vm-deletion
@tamirkamara @jonnyry attempt number 2, thoughts on this approach? |
@dram1964 fancy testing this one? |
Hi @marrobi, I did test the original fix, but didn't realise that this left the os_disk deployed. Happy to test out the new code, but I was wondering whether this is the best approach. |
Agree, that's another option, just worry about turning a VM on that has been intentionally stopped. Imagine it has a start-up script that does stuff, or you turn it off as it has some malware. I'd prefer to just get rid of it. |
Wouldn't it be easier to use azure cli to delete the VM if it's not on and then let TF do its thing without any other modification? |
Ah, hadn't seen that - making a note to follow to hashicorp/terraform-provider-azurerm#28412 I used this approach as thought it was generic and could be reused for other services where we get lingering resources. Providing they are tagged they will get deleted. If it's going to be reverted, don't mind, as long as it's fixed :) |
Draft - what think about this approach with a script to ensure child resources are deleted? Need to do other VMs.
Add a configuration option to Guacamole VM templates to skip shutdown and force deletion, resolving the issue where VMs in a stopped state cannot be deleted. Update relevant Terraform and Porter files to implement this change and increment version numbers accordingly.
Fixes #4135