Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Fixes] Fix DataProtection Backup Vaults #2307

Merged
merged 8 commits into from
Nov 18, 2022
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource backupVault 'Microsoft.DataProtection/backupVaults@2022-03-01' existing = {
resource backupVault 'Microsoft.DataProtection/backupVaults@2022-05-01' existing = {
name: backupVaultName
}

resource backupPolicy 'Microsoft.DataProtection/backupVaults/backupPolicies@2022-03-01' = {
resource backupPolicy 'Microsoft.DataProtection/backupVaults/backupPolicies@2022-05-01' = {
name: name
parent: backupVault
properties: properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This module deploys DataProtection BackupVaults BackupPolicies.

| Resource Type | API Version |
| :-- | :-- |
| `Microsoft.DataProtection/backupVaults/backupPolicies` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-03-01/backupVaults/backupPolicies) |
| `Microsoft.DataProtection/backupVaults/backupPolicies` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-05-01/backupVaults/backupPolicies) |

## Parameters

Expand Down
11 changes: 6 additions & 5 deletions modules/Microsoft.DataProtection/backupVaults/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@ param systemAssignedIdentity bool = false
@description('Optional. Tags of the Recovery Service Vault resource.')
param tags object = {}

@description('Optional. The datastore type to use.')
@description('Optional. The datastore type to use. ArchiveStore does not support ZoneRedundancy.')
@allowed([
'ArchiveStore'
'SnapshotStore'
'VaultStore'
'OperationalStore'
])
param dataStoreType string = 'SnapshotStore'
param dataStoreType string = 'VaultStore'

@description('Optional. The vault redundancy level to use.')
@allowed([
'LocallyRedundant'
'GeoRedundant'
'ZoneRedundant'
])
param type string = 'LocallyRedundant'
param type string = 'GeoRedundant'

@description('Optional. List of all backup policies.')
param backupPolicies array = []
Expand All @@ -62,7 +63,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}

resource backupVault 'Microsoft.DataProtection/backupVaults@2022-03-01' = {
resource backupVault 'Microsoft.DataProtection/backupVaults@2022-05-01' = {
name: name
location: location
tags: tags
Expand Down
8 changes: 4 additions & 4 deletions modules/Microsoft.DataProtection/backupVaults/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This module deploys DataProtection BackupVaults.
| :-- | :-- |
| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) |
| `Microsoft.Authorization/roleAssignments` | [2022-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2022-04-01/roleAssignments) |
| `Microsoft.DataProtection/backupVaults` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-03-01/backupVaults) |
| `Microsoft.DataProtection/backupVaults/backupPolicies` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-03-01/backupVaults/backupPolicies) |
| `Microsoft.DataProtection/backupVaults` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-05-01/backupVaults) |
| `Microsoft.DataProtection/backupVaults/backupPolicies` | [2022-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DataProtection/2022-05-01/backupVaults/backupPolicies) |

## Parameters

Expand All @@ -32,14 +32,14 @@ This module deploys DataProtection BackupVaults.
| Parameter Name | Type | Default Value | Allowed Values | Description |
| :-- | :-- | :-- | :-- | :-- |
| `backupPolicies` | _[backupPolicies](backupPolicies/readme.md)_ array | `[]` | | List of all backup policies. |
| `dataStoreType` | string | `'SnapshotStore'` | `[ArchiveStore, SnapshotStore, VaultStore]` | The datastore type to use. |
| `dataStoreType` | string | `'VaultStore'` | `[ArchiveStore, OperationalStore, VaultStore]` | The datastore type to use. ArchiveStore does not support ZoneRedundancy. |
| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). |
| `location` | string | `[resourceGroup().location]` | | Location for all resources. |
| `lock` | string | `''` | `['', CanNotDelete, ReadOnly]` | Specify the type of lock. |
| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. |
| `tags` | object | `{object}` | | Tags of the Recovery Service Vault resource. |
| `type` | string | `'LocallyRedundant'` | `[GeoRedundant, LocallyRedundant]` | The vault redundancy level to use. |
| `type` | string | `'GeoRedundant'` | `[GeoRedundant, LocallyRedundant, ZoneRedundant]` | The vault redundancy level to use. |


### Parameter Usage: `backupPolicies`
Expand Down