Enable soft delete for workspace backup Recovery Services vaults#4907
Enable soft delete for workspace backup Recovery Services vaults#4907Copilot wants to merge 5 commits into
Conversation
Agent-Logs-Url: https://github.com/microsoft/AzureTRE/sessions/c847d284-ba5e-406d-ba8d-c5c4eaa47d84 Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
|
@copilot no, dont use azapi: Enabling soft delete does not prevent you from deleting the Backup Vault itself, as long as there are no protected (or soft‑deleted) backup items still in it. So set it explicitly to on. But consider side effects and need to maintain current functionality. Also ensure the azureRm provider is the latest release (pinned). |
Agent-Logs-Url: https://github.com/microsoft/AzureTRE/sessions/09dce1c2-3f0c-4c8a-b9bc-950d78b75e6d Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Addressed in 3d11658. The vault is back on AzureRM, Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the workspace base Terraform template to comply with Azure’s requirement that soft delete is enabled on newly created Recovery Services Vaults, while preserving current workspace deletion/cleanup behavior by ensuring protected items are purged on destroy.
Changes:
- Enable
soft_delete_enabled = truefor the workspace backupazurerm_recovery_services_vault. - Configure AzureRM provider
recovery_servicefeatures to purge protected items and avoid retaining VM backup data on destroy. - Bump the workspace base AzureRM provider pin/lockfile to
4.58.0and update the template version + changelog entry.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| templates/workspaces/base/terraform/providers.tf | Bumps AzureRM to 4.58.0 and configures provider recovery services destroy behavior. |
| templates/workspaces/base/terraform/backup/backup.tf | Enables soft delete on the workspace backup Recovery Services Vault. |
| templates/workspaces/base/terraform/.terraform.lock.hcl | Updates AzureRM provider lock to 4.58.0 and corresponding hashes. |
| templates/workspaces/base/porter.yaml | Bumps tre-workspace-base bundle version to 2.8.4. |
| CHANGELOG.md | Documents the fix under BUG FIXES. |
Files not reviewed (1)
- templates/workspaces/base/terraform/.terraform.lock.hcl: Language not supported
Agent-Logs-Url: https://github.com/microsoft/AzureTRE/sessions/fb2a7fcc-0cc4-47ff-acac-961ef1cb9334 Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/test-extended 43c865c |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/26244326090 (with refid (in response to this comment from @marrobi) |
|
/test 844071f |
|
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/26250270305 (with refid (in response to this comment from @rudolphjacksonm) |
What is being addressed
Workspace creation with backup enabled can fail when the workspace backup Recovery Services Vault is created with soft delete disabled. Azure now requires soft delete to be enabled for new vaults, so attempts to create the vault with
soft_delete_enabled = falsecan be rejected and leave the workspace deployment stuck.This change also needs to preserve current workspace delete behavior so backup-related resources do not block cleanup.
How is this addressed
Recovery Services Vault configuration
azurerm_recovery_services_vaultsoft_delete_enabled = trueexplicitly for the workspace backup vaultDelete behavior
recovery_servicefeatures to purge protected items from the vault on destroyvm_backup_stop_protection_and_retain_data_on_destroy = falseso workspace cleanup continues to remove backup data rather than retaining itProvider/version updates
4.57.0to4.73.0(latest)Template/versioning
tre-workspace-baseat2.8.4CHANGELOG.mdto describe the AzureRM soft-delete-based fix