From 2c81703aba60ac61eb9c9c30c29f81cf3d781c32 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 13:38:50 +0200 Subject: [PATCH 1/9] Updated DataProtection Backup Vaults to new dependency approach --- .../ms.dataprotection.backupvaults.yml | 3 +- .../.test/default/dependencies.bicep | 16 +++ .../.test/default/deploy.test.bicep | 120 ++++++++++++++++++ .../backupVaults/.test/min.parameters.json | 9 -- .../backupVaults/.test/min/deploy.test.bicep | 46 +++++++ .../backupVaults/.test/parameters.json | 76 ----------- .../backupVaults/readme.md | 112 ++++++++++------ 7 files changed, 254 insertions(+), 128 deletions(-) create mode 100644 modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep create mode 100644 modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep delete mode 100644 modules/Microsoft.DataProtection/backupVaults/.test/min.parameters.json create mode 100644 modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.DataProtection/backupVaults/.test/parameters.json diff --git a/.github/workflows/ms.dataprotection.backupvaults.yml b/.github/workflows/ms.dataprotection.backupvaults.yml index 759adf323e..31a039b956 100644 --- a/.github/workflows/ms.dataprotection.backupvaults.yml +++ b/.github/workflows/ms.dataprotection.backupvaults.yml @@ -106,8 +106,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep new file mode 100644 index 0000000000..0f0755a6f4 --- /dev/null +++ b/modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep @@ -0,0 +1,16 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Managed Identity to create.') +param managedIdentityName string + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +@description('The principal ID of the created Managed Identity.') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The resource ID of the created Managed Identity.') +output managedIdentityResourceId string = managedIdentity.id diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep new file mode 100644 index 0000000000..e7db584271 --- /dev/null +++ b/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep @@ -0,0 +1,120 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'dpbvdef' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + managedIdentityName: 'dep-<>-msi-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + roleAssignments: [ + { + principalIds: [ + resourceGroupResources.outputs.managedIdentityPrincipalId + ] + roleDefinitionIdOrName: 'Reader' + } + ] + systemAssignedIdentity: true + userAssignedIdentities: { + '${resourceGroupResources.outputs.managedIdentityResourceId}': {} + } + backupPolicies: [ + { + name: 'DefaultPolicy' + properties: { + datasourceTypes: [ + 'Microsoft.Compute/disks' + ] + objectType: 'BackupPolicy' + policyRules: [ + { + backupParameters: { + backupType: 'Incremental' + objectType: 'AzureBackupParams' + } + dataStore: { + dataStoreType: 'OperationalStore' + objectType: 'DataStoreInfoBase' + } + name: 'BackupDaily' + objectType: 'AzureBackupRule' + trigger: { + objectType: 'ScheduleBasedTriggerContext' + schedule: { + repeatingTimeIntervals: [ + 'R/2022-05-31T23:30:00+01:00/P1D' + ] + timeZone: 'W. Europe Standard Time' + } + taggingCriteria: [ + { + isDefault: true + taggingPriority: 99 + tagInfo: { + id: 'Default_' + tagName: 'Default' + } + } + ] + } + } + { + isDefault: true + lifecycles: [ + { + deleteAfter: { + duration: 'P7D' + objectType: 'AbsoluteDeleteOption' + } + sourceDataStore: { + dataStoreType: 'OperationalStore' + objectType: 'DataStoreInfoBase' + } + targetDataStoreCopySettings: [] + } + ] + name: 'Default' + objectType: 'AzureRetentionRule' + } + ] + } + } + ] + lock: 'CanNotDelete' + } +} diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min.parameters.json b/modules/Microsoft.DataProtection/backupVaults/.test/min.parameters.json deleted file mode 100644 index 6b44ecfa38..0000000000 --- a/modules/Microsoft.DataProtection/backupVaults/.test/min.parameters.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-bv-min-001" - } - } -} diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..32e013d35e --- /dev/null +++ b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep @@ -0,0 +1,46 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +param serviceShort string = '...' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + managedIdentityName: 'dep-<>-msi-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + } +} + diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/parameters.json b/modules/Microsoft.DataProtection/backupVaults/.test/parameters.json deleted file mode 100644 index bad76a8a40..0000000000 --- a/modules/Microsoft.DataProtection/backupVaults/.test/parameters.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-bv-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "backupPolicies": { - "value": [ - { - "name": "DefaultPolicy", - "properties": { - "policyRules": [ - { - "backupParameters": { - "backupType": "Incremental", - "objectType": "AzureBackupParams" - }, - "trigger": { - "schedule": { - "repeatingTimeIntervals": [ - "R/2022-05-31T23:30:00+01:00/P1D" - ], - "timeZone": "W. Europe Standard Time" - }, - "taggingCriteria": [ - { - "tagInfo": { - "tagName": "Default", - "id": "Default_" - }, - "taggingPriority": 99, - "isDefault": true - } - ], - "objectType": "ScheduleBasedTriggerContext" - }, - "dataStore": { - "dataStoreType": "OperationalStore", - "objectType": "DataStoreInfoBase" - }, - "name": "BackupDaily", - "objectType": "AzureBackupRule" - }, - { - "lifecycles": [ - { - "deleteAfter": { - "objectType": "AbsoluteDeleteOption", - "duration": "P7D" - }, - "targetDataStoreCopySettings": [], - "sourceDataStore": { - "dataStoreType": "OperationalStore", - "objectType": "DataStoreInfoBase" - } - } - ], - "isDefault": true, - "name": "Default", - "objectType": "AzureRetentionRule" - } - ], - "datasourceTypes": [ - "Microsoft.Compute/disks" - ], - "objectType": "BackupPolicy" - } - } - ] - } - } -} diff --git a/modules/Microsoft.DataProtection/backupVaults/readme.md b/modules/Microsoft.DataProtection/backupVaults/readme.md index 5388797ee5..1446228f09 100644 --- a/modules/Microsoft.DataProtection/backupVaults/readme.md +++ b/modules/Microsoft.DataProtection/backupVaults/readme.md @@ -341,7 +341,7 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Min

+

Example 1: Default

@@ -349,47 +349,10 @@ The following module usage examples are retrieved from the content of the files ```bicep module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-BackupVaults' - params: { - name: '<>-az-bv-min-001' - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-bv-min-001" - } - } -} -``` - -
-

- -

Example 2: Parameters

- -
- -via Bicep module - -```bicep -module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-BackupVaults' + name: '${uniqueString(deployment().name)}-test-dpbvdef' params: { // Required parameters - name: '<>-az-bv-x-001' + name: '<>dpbvdef001' // Non-required parameters backupPolicies: [ { @@ -454,6 +417,18 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { } ] lock: 'CanNotDelete' + roleAssignments: [ + { + principalIds: [ + '' + ] + roleDefinitionIdOrName: 'Reader' + } + ] + systemAssignedIdentity: true + userAssignedIdentities: { + '': {} + } } } ``` @@ -472,7 +447,7 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>-az-bv-x-001" + "value": "<>dpbvdef001" }, // Non-required parameters "backupPolicies": { @@ -541,6 +516,61 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { }, "lock": { "value": "CanNotDelete" + }, + "roleAssignments": { + "value": [ + { + "principalIds": [ + "" + ], + "roleDefinitionIdOrName": "Reader" + } + ] + }, + "systemAssignedIdentity": { + "value": true + }, + "userAssignedIdentities": { + "value": { + "": {} + } + } + } +} +``` + +
+

+ +

Example 2: Min

+ +
+ +via Bicep module + +```bicep +module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-...' + params: { + name: '<>...001' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>...001" } } } From 1cd243a67778e4846e5b120a1a9ee62906a47788 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 13:47:44 +0200 Subject: [PATCH 2/9] Updated min --- .../backupVaults/.test/min/deploy.test.bicep | 11 +---------- .../Microsoft.DataProtection/backupVaults/readme.md | 6 +++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep index 32e013d35e..c00c8f6569 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep @@ -11,7 +11,7 @@ param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort} param location string = deployment().location @description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') -param serviceShort string = '...' +param serviceShort string = 'dpbvmin' // =========== // // Deployments // @@ -24,14 +24,6 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { location: location } -module resourceGroupResources 'dependencies.bicep' = { - scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-paramNested' - params: { - managedIdentityName: 'dep-<>-msi-${serviceShort}' - } -} - // ============== // // Test Execution // // ============== // @@ -43,4 +35,3 @@ module testDeployment '../../deploy.bicep' = { name: '<>${serviceShort}001' } } - diff --git a/modules/Microsoft.DataProtection/backupVaults/readme.md b/modules/Microsoft.DataProtection/backupVaults/readme.md index 1446228f09..92d5c20a3a 100644 --- a/modules/Microsoft.DataProtection/backupVaults/readme.md +++ b/modules/Microsoft.DataProtection/backupVaults/readme.md @@ -550,9 +550,9 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { ```bicep module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-...' + name: '${uniqueString(deployment().name)}-test-dpbvmin' params: { - name: '<>...001' + name: '<>dpbvmin001' } } ``` @@ -570,7 +570,7 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { "contentVersion": "1.0.0.0", "parameters": { "name": { - "value": "<>...001" + "value": "<>dpbvmin001" } } } From ba9dc748072509f5099aad5ab9b01803ac783d5f Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 14:21:23 +0200 Subject: [PATCH 3/9] Removed user assigned --- .../backupVaults/.test/default/deploy.test.bicep | 3 --- .../Microsoft.DataProtection/backupVaults/deploy.bicep | 6 +----- modules/Microsoft.DataProtection/backupVaults/readme.md | 9 --------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep index e7db584271..98d1258120 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep @@ -50,9 +50,6 @@ module testDeployment '../../deploy.bicep' = { } ] systemAssignedIdentity: true - userAssignedIdentities: { - '${resourceGroupResources.outputs.managedIdentityResourceId}': {} - } backupPolicies: [ { name: 'DefaultPolicy' diff --git a/modules/Microsoft.DataProtection/backupVaults/deploy.bicep b/modules/Microsoft.DataProtection/backupVaults/deploy.bicep index e940b43e9b..83142c5e46 100644 --- a/modules/Microsoft.DataProtection/backupVaults/deploy.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/deploy.bicep @@ -21,9 +21,6 @@ param lock string = '' @description('Optional. Enables system assigned managed identity on the resource.') param systemAssignedIdentity bool = false -@description('Optional. The ID(s) to assign to the resource.') -param userAssignedIdentities object = {} - @description('Optional. Tags of the Recovery Service Vault resource.') param tags object = {} @@ -45,11 +42,10 @@ param type string = 'LocallyRedundant' @description('Optional. List of all backup policies.') param backupPolicies array = [] -var identityType = systemAssignedIdentity ? (!empty(userAssignedIdentities) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(userAssignedIdentities) ? 'UserAssigned' : 'None') +var identityType = systemAssignedIdentity ? 'SystemAssigned' : 'None' var identity = identityType != 'None' ? { type: identityType - userAssignedIdentities: !empty(userAssignedIdentities) ? userAssignedIdentities : null } : null var enableReferencedModulesTelemetry = false diff --git a/modules/Microsoft.DataProtection/backupVaults/readme.md b/modules/Microsoft.DataProtection/backupVaults/readme.md index 92d5c20a3a..dbc4cb7e43 100644 --- a/modules/Microsoft.DataProtection/backupVaults/readme.md +++ b/modules/Microsoft.DataProtection/backupVaults/readme.md @@ -38,7 +38,6 @@ This module deploys DataProtection BackupVaults. | `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. | -| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. | ### Parameter Usage: `backupPolicies` @@ -426,9 +425,6 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { } ] systemAssignedIdentity: true - userAssignedIdentities: { - '': {} - } } } ``` @@ -529,11 +525,6 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { }, "systemAssignedIdentity": { "value": true - }, - "userAssignedIdentities": { - "value": { - "": {} - } } } } From 6ad679bbab1b882af3c73482175bd213ffdde74d Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 8 Sep 2022 19:21:25 +0200 Subject: [PATCH 4/9] Updated folder default to common. --- .../backupVaults/.test/{default => common}/dependencies.bicep | 0 .../backupVaults/.test/{default => common}/deploy.test.bicep | 0 modules/Microsoft.DataProtection/backupVaults/readme.md | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename modules/Microsoft.DataProtection/backupVaults/.test/{default => common}/dependencies.bicep (100%) rename modules/Microsoft.DataProtection/backupVaults/.test/{default => common}/deploy.test.bicep (100%) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/common/dependencies.bicep similarity index 100% rename from modules/Microsoft.DataProtection/backupVaults/.test/default/dependencies.bicep rename to modules/Microsoft.DataProtection/backupVaults/.test/common/dependencies.bicep diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep similarity index 100% rename from modules/Microsoft.DataProtection/backupVaults/.test/default/deploy.test.bicep rename to modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep diff --git a/modules/Microsoft.DataProtection/backupVaults/readme.md b/modules/Microsoft.DataProtection/backupVaults/readme.md index dbc4cb7e43..8799c6f520 100644 --- a/modules/Microsoft.DataProtection/backupVaults/readme.md +++ b/modules/Microsoft.DataProtection/backupVaults/readme.md @@ -340,7 +340,7 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Default

+

Example 1: Common

From f9893fd7282571129bfc636f1c352fd1fea3c70e Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 12:52:54 +0200 Subject: [PATCH 5/9] Update to latest --- .../backupVaults/.test/common/deploy.test.bicep | 4 ++-- .../backupVaults/.test/min/deploy.test.bicep | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep index 98d1258120..f7db3569e0 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep @@ -10,8 +10,8 @@ param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort} @description('Optional. The location to deploy resources to') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') -param serviceShort string = 'dpbvdef' +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'dpbvcom' // =========== // // Deployments // diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep index c00c8f6569..12bdb39090 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep @@ -10,7 +10,7 @@ param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort} @description('Optional. The location to deploy resources to') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment .Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') param serviceShort string = 'dpbvmin' // =========== // From b4697578d5a10dcd9a9e64a9f737574cf264308d Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:06:13 +0200 Subject: [PATCH 6/9] Update to latest --- .../backupVaults/.test/common/deploy.test.bicep | 6 +++--- .../backupVaults/.test/min/deploy.test.bicep | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep index f7db3569e0..96c4414acc 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'dpbvcom' // =========== // diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep index 12bdb39090..0865175400 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'dpbvmin' // =========== // From 2b014f99ee4296416e687d6c0adc8bdd9a1103d2 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 14:19:08 +0200 Subject: [PATCH 7/9] Update to latest --- modules/Microsoft.DataProtection/backupVaults/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/readme.md b/modules/Microsoft.DataProtection/backupVaults/readme.md index 022d25e4b6..fe92a49343 100644 --- a/modules/Microsoft.DataProtection/backupVaults/readme.md +++ b/modules/Microsoft.DataProtection/backupVaults/readme.md @@ -349,10 +349,10 @@ The following module usage examples are retrieved from the content of the files ```bicep module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-dpbvdef' + name: '${uniqueString(deployment().name)}-test-dpbvcom' params: { // Required parameters - name: '<>dpbvdef001' + name: '<>dpbvcom001' // Non-required parameters backupPolicies: [ { @@ -444,7 +444,7 @@ module backupVaults './Microsoft.DataProtection/backupVaults/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>dpbvdef001" + "value": "<>dpbvcom001" }, // Non-required parameters "backupPolicies": { From aa65431ec735461135245c421d6bb6d15d1d7c17 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:18:26 +0200 Subject: [PATCH 8/9] Update modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep --- .../backupVaults/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep index 96c4414acc..fce5e9870d 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/common/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg' From 74eb9ceea0491eec132c6248082161215f8b5ed2 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:18:42 +0200 Subject: [PATCH 9/9] Update modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep --- .../backupVaults/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep index 0865175400..de4dcec137 100644 --- a/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DataProtection/backupVaults/.test/min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.dataprotection.backupvaults-${serviceShort}-rg'