Add backups to workspaces. ignore this. #4378
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #4362
This pull request introduces significant updates to the base template for workspaces, primarily focusing on adding backup capabilities and enhancing the cleanup process for Azure Recovery Services Vaults. The key changes include the addition of new parameters and outputs, updates to the
porter.yaml
file for handling backups, and the creation of new Terraform resources for managing backups.Backup and Recovery Enhancements:
templates/workspaces/base/cleanup_vault.sh
: Added a new script to handle the cleanup of Azure Recovery Services Vaults, including disabling soft delete and removing protected items.templates/workspaces/base/terraform/backup/backup.tf
: Introduced new Terraform resources to create and manage Azure Recovery Services Vaults, VM backup policies, and file share backup policies.templates/workspaces/base/porter.yaml
: Updated to include new parameters and outputs related to backup configuration, and added steps to handle backup vault cleanup during uninstallation. [1] [2] [3] [4] [5] [6] [7] [8]Parameter and Schema Updates:
templates/workspaces/base/parameters.json
: Added new parametersenable_backup
andshared_storage_name
to support backup configurations.templates/workspaces/base/template_schema.json
: Updated the schema to include theenable_backup
parameter, allowing backups to be enabled or disabled for the workspace. [1] [2]Terraform Configuration:
templates/workspaces/base/terraform/backup/variables.tf
: Defined new variables for backup configurations, includinglocation
,tre_id
,resource_group_name
, andshared_storage_name
.templates/workspaces/base/terraform/backup/outputs.tf
: Added new outputs for backup vault and policy names to be used in other parts of the configuration.templates/workspaces/base/terraform/storage.tf
: Updated the shared storage name variable to be configurable.Role Assignments:
templates/workspaces/base/terraform/api-permissions.tf
: Added new role assignments forBackup Contributor
andSite Recovery Contributor
to manage backup and site recovery permissions.These changes collectively enhance the robustness of the workspace by adding comprehensive backup and recovery functionalities, ensuring that critical data can be protected and restored as needed.
What is being addressed
Added in a boolen for enable_backup that is set in the workspace config window. The system will deploy a recovery vault and the needed policy's.
It passes the names of the polices back out so they can be used by other services (sql, vm, etc).
How is this addressed