This module will create a recovery services vault.
You can optionally configure backup policies, system identity, backup storage type, cross region restore and enable diagnostics logs and a delete lock.
param deploymentName string = 'recoveryServices${utcNow()}'
module recoveryServices './main.bicep' = {
name: deploymentName
params: {
vaultName: 'MyRecoveryServicesVault'
enableDeleteLock: true
enableDiagnostics: true
diagnosticStorageAccountId:'StorageAccountResourceId'
logAnalyticsWorkspaceId: 'LogAnalyticsResourceId'
}
}
param deploymentName string = 'recoveryServices${utcNow()}'
module recoveryServices './main.bicep' = {
name: deploymentName
params: {
vaultName: 'MyRecoveryServicesVault'
enableSystemIdentity: true
storageType: 'LocallyRedundant'
}
}
param deploymentName string = 'recoveryServices${utcNow()}'
module recoveryServices './main.bicep' = {
name: deploymentName
params: {
vaultName: 'MyRecoveryServicesVault'
storageType: 'GeoRedundant'
enablecrossRegionRestore: true
}
}
param deploymentName string = 'recoveryServices${utcNow()}'
module recoveryServices './main.bicep' = {
name: deploymentName
params: {
vaultName: 'MyRecoveryServicesVault'
backupPolicies = [
{
policyName: 'Policy-Example1'
properties: {
backupManagementType: 'AzureIaasVM'
instantRpRetentionRangeInDays: 2
schedulePolicy: {
scheduleRunFrequency: 'Daily'
scheduleRunTimes: [
'2021-09-05T21:00:00Z'
]
schedulePolicyType: 'SimpleSchedulePolicy'
}
timeZone: 'AUS Eastern Standard Time'
retentionPolicy: {
dailySchedule: {
retentionTimes: [
'2021-09-05T21:00:00Z'
]
retentionDuration: {
count: 14
durationType: 'Days'
}
}
retentionPolicyType: 'LongTermRetentionPolicy'
}
}
}
{
policyName: 'Policy-Example2'
properties: {
backupManagementType: 'AzureIaasVM'
instantRpRetentionRangeInDays: 5
schedulePolicy: {
scheduleRunFrequency: 'Weekly'
scheduleRunDays: [
'Sunday'
'Wednesday'
]
scheduleRunTimes: [
'2021-09-05T21:00:00Z'
]
schedulePolicyType: 'SimpleSchedulePolicy'
}
timeZone: 'AUS Eastern Standard Time'
retentionPolicy: {
dailySchedule: null
weeklySchedule: {
daysOfTheWeek: [
'Sunday'
'Wednesday'
]
retentionTimes: [
'2021-09-05T21:00:00Z'
]
retentionDuration: {
count: 4
durationType: 'Weeks'
}
}
monthlySchedule: {
retentionScheduleFormatType: 'Weekly'
retentionScheduleDaily: {
daysOfTheMonth: [
{
date: 1
isLast: false
}
]
}
retentionScheduleWeekly: {
daysOfTheWeek: [
'Sunday'
'Wednesday'
]
weeksOfTheMonth: [
'First'
'Third'
]
}
retentionTimes: [
'2021-09-05T21:00:00Z'
]
retentionDuration: {
count: 12
durationType: 'Months'
}
}
yearlySchedule: {
retentionScheduleFormatType: 'Weekly'
monthsOfYear: [
'January'
'March'
'August'
]
retentionScheduleDaily: {
daysOfTheMonth: [
{
date: 1
isLast: false
}
]
}
retentionScheduleWeekly: {
daysOfTheWeek: [
'Sunday'
'Wednesday'
]
weeksOfTheMonth: [
'First'
'Third'
]
}
retentionTimes: [
'2021-09-05T21:00:00Z'
]
retentionDuration: {
count: 7
durationType: 'Years'
}
}
retentionPolicyType: 'LongTermRetentionPolicy'
}
}
}
]
}
}