Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions migration-backup-policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ resource "azurerm_recovery_services_vault" "darts-migration-backup" {
location = azurerm_resource_group.darts_migration_resource_group[0].location
resource_group_name = azurerm_resource_group.darts_migration_resource_group[0].name
sku = "Standard"
tags = var.common_tags
}

resource "azurerm_role_assignment" "backup-operator" {
for_each = toset(var.backup_operators)
scope = azurerm_recovery_services_vault.darts-migration-backup.id
role_definition_name = "Backup Operator"
principal_id = each.value
}

resource "azurerm_backup_policy_vm" "darts-migration-backup" {
Expand Down
6 changes: 6 additions & 0 deletions prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ palo_networks = {
enable_ip_forwarding = true
}
}

backup_operators = [
"e1ba3996-34e9-4ce2-b34f-4d5f28a9310c", // Richard Penswick
"675f1c23-3e46-4cf8-867b-747eb60fe89d", // Scott Robertson
"1d52a6eb-aa62-4dff-a7ac-3d71bccb67fc" // Ben Neill
]
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,9 @@ variable "max-file-upload-megabytes" {
default = "350"
description = "The file upload size threshold in megabytes "
}

variable "backup_operators" {
description = "List of pricipal IDs to assign the 'Backup Operator' role over the RSV."
type = list(string)
default = []
}