From a460fd3d7e156fa7a99556ccdd6da7b1bd1eb929 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 14:54:44 +0200 Subject: [PATCH 1/9] Updated DesktopVirtualization ApplicationGroups to new dependency approach --- ...esktopvirtualization.applicationgroups.yml | 3 +- .../.test/default/dependencies.bicep | 28 ++++ .../.test/default/deploy.test.bicep | 97 +++++++++++++ .../.test/min.parameters.json | 15 -- .../.test/min/dependencies.bicep | 28 ++++ .../.test/min/deploy.test.bicep | 48 +++++++ .../applicationgroups/.test/parameters.json | 72 ---------- .../applicationgroups/readme.md | 130 +++++++++--------- 8 files changed, 267 insertions(+), 154 deletions(-) create mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep create mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep delete mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min.parameters.json create mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep create mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.DesktopVirtualization/applicationgroups/.test/parameters.json diff --git a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml b/.github/workflows/ms.desktopvirtualization.applicationgroups.yml index db44002f93..929df1944d 100644 --- a/.github/workflows/ms.desktopvirtualization.applicationgroups.yml +++ b/.github/workflows/ms.desktopvirtualization.applicationgroups.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.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep new file mode 100644 index 0000000000..3fdc3b8e2e --- /dev/null +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep @@ -0,0 +1,28 @@ +@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 + +@description('Required. The name of the Host Pool to create.') +param hostPoolName string + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { + name: hostPoolName + properties: { + hostPoolType: 'Pooled' + loadBalancerType: 'BreadthFirst' + preferredAppGroupType: 'Desktop' + } +} + +@description('The principal ID of the created Managed Identity.') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The resource ID of the created Host Pool.') +output hostPoolResourceId string = hostPool.id diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep new file mode 100644 index 0000000000..e8ec6288b5 --- /dev/null +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep @@ -0,0 +1,97 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.desktopvirtualization.applicationgroups-${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 = 'dvagdef' + +// =========== // +// 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}' + hostPoolName: 'dep-<>-hp-${serviceShort}' + } +} + +// Diagnostics +// =========== +module diagnosticDependencies '../../../../.shared/dependencyConstructs/diagnostic.dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + params: { + storageAccountName: 'dep<>diasa${serviceShort}01' + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + eventHubNamespaceEventHubName: 'dep-<>-evh-${serviceShort}' + eventHubNamespaceName: 'dep-<>-evhns-${serviceShort}' + location: location + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + applicationGroupType: 'RemoteApp' + hostpoolName: last(split(resourceGroupResources.outputs.hostPoolResourceId, '/')) + applications: [ + { + commandLineArguments: '' + commandLineSetting: 'DoNotAllow' + description: 'Notepad by ARM template' + filePath: 'C:\\Windows\\System32\\notepad.exe' + friendlyName: 'Notepad' + iconIndex: 0 + iconPath: 'C:\\Windows\\System32\\notepad.exe' + name: 'notepad' + showInPortal: true + } + { + filePath: 'C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe' + friendlyName: 'Wordpad' + name: 'wordpad' + } + ] + description: 'This is my first Remote Applications bundle' + diagnosticLogsRetentionInDays: 7 + diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId + diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + friendlyName: 'Remote Applications 1' + location: location + lock: 'CanNotDelete' + roleAssignments: [ + { + principalIds: [ + resourceGroupResources.outputs.managedIdentityPrincipalId + ] + roleDefinitionIdOrName: 'Reader' + } + ] + } +} diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min.parameters.json b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min.parameters.json deleted file mode 100644 index ecf7a145e6..0000000000 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min.parameters.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-avdag-min-001" - }, - "applicationGroupType": { - "value": "RemoteApp" - }, - "hostpoolName": { - "value": "adp-<>-az-avdhp-x-001" - } - } -} diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep new file mode 100644 index 0000000000..3fdc3b8e2e --- /dev/null +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep @@ -0,0 +1,28 @@ +@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 + +@description('Required. The name of the Host Pool to create.') +param hostPoolName string + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { + name: hostPoolName + properties: { + hostPoolType: 'Pooled' + loadBalancerType: 'BreadthFirst' + preferredAppGroupType: 'Desktop' + } +} + +@description('The principal ID of the created Managed Identity.') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The resource ID of the created Host Pool.') +output hostPoolResourceId string = hostPool.id diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..fc0e520d1e --- /dev/null +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep @@ -0,0 +1,48 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.desktopvirtualization.applicationgroups-${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 = 'dvagmin' + +// =========== // +// 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}' + hostPoolName: 'dep-<>-hp-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + applicationGroupType: 'RemoteApp' + hostpoolName: last(split(resourceGroupResources.outputs.hostPoolResourceId, '/')) + } +} diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/parameters.json b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/parameters.json deleted file mode 100644 index 7e71ce4904..0000000000 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/parameters.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-avdag-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "location": { - "value": "westeurope" - }, - "applicationGroupType": { - "value": "RemoteApp" - }, - "hostpoolName": { - "value": "adp-<>-az-avdhp-x-001" - }, - "friendlyName": { - "value": "Remote Applications 1" - }, - "description": { - "value": "This is my first Remote Applications bundle" - }, - "applications": { - "value": [ - { - "name": "notepad", - "description": "Notepad by ARM template", - "friendlyName": "Notepad", - "filePath": "C:\\Windows\\System32\\notepad.exe", - "commandLineSetting": "DoNotAllow", - "commandLineArguments": "", - "showInPortal": true, - "iconPath": "C:\\Windows\\System32\\notepad.exe", - "iconIndex": 0 - }, - { - "name": "wordpad", - "filePath": "C:\\Program Files\\Windows NT\\Accessories\\wordpad.exe", - "friendlyName": "Wordpad" - } - ] - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - }, - "diagnosticLogsRetentionInDays": { - "value": 7 - }, - "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" - }, - "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" - }, - "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" - }, - "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" - } - } -} diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md index fc75fd3a85..40f8530b22 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md @@ -168,7 +168,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

@@ -176,59 +176,12 @@ The following module usage examples are retrieved from the content of the files ```bicep module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Applicationgroups' + name: '${uniqueString(deployment().name)}-test-dvagdef' params: { // Required parameters applicationGroupType: 'RemoteApp' - hostpoolName: 'adp-<>-az-avdhp-x-001' - name: '<>-az-avdag-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": { - // Required parameters - "applicationGroupType": { - "value": "RemoteApp" - }, - "hostpoolName": { - "value": "adp-<>-az-avdhp-x-001" - }, - "name": { - "value": "<>-az-avdag-min-001" - } - } -} -``` - -
-

- -

Example 2: Parameters

- -
- -via Bicep module - -```bicep -module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Applicationgroups' - params: { - // Required parameters - applicationGroupType: 'RemoteApp' - hostpoolName: 'adp-<>-az-avdhp-x-001' - name: '<>-az-avdag-x-001' + hostpoolName: '' + name: '<>dvagdef001' // Non-required parameters applications: [ { @@ -249,18 +202,18 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de } ] description: 'This is my first Remote Applications bundle' - diagnosticEventHubAuthorizationRuleId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey' - diagnosticEventHubName: 'adp-<>-az-evh-x-001' + diagnosticEventHubAuthorizationRuleId: '' + diagnosticEventHubName: '' diagnosticLogsRetentionInDays: 7 - diagnosticStorageAccountId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001' - diagnosticWorkspaceId: '/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001' + diagnosticStorageAccountId: '' + diagnosticWorkspaceId: '' friendlyName: 'Remote Applications 1' - location: 'westeurope' + location: '' lock: 'CanNotDelete' roleAssignments: [ { principalIds: [ - '<>' + '' ] roleDefinitionIdOrName: 'Reader' } @@ -286,10 +239,10 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de "value": "RemoteApp" }, "hostpoolName": { - "value": "adp-<>-az-avdhp-x-001" + "value": "" }, "name": { - "value": "<>-az-avdag-x-001" + "value": "<>dvagdef001" }, // Non-required parameters "applications": { @@ -316,25 +269,25 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de "value": "This is my first Remote Applications bundle" }, "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + "value": "" }, "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" + "value": "" }, "diagnosticLogsRetentionInDays": { "value": 7 }, "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" + "value": "" }, "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" + "value": "" }, "friendlyName": { "value": "Remote Applications 1" }, "location": { - "value": "westeurope" + "value": "" }, "lock": { "value": "CanNotDelete" @@ -343,7 +296,7 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de "value": [ { "principalIds": [ - "<>" + "" ], "roleDefinitionIdOrName": "Reader" } @@ -355,3 +308,50 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de

+ +

Example 2: Min

+ +
+ +via Bicep module + +```bicep +module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-dvagmin' + params: { + // Required parameters + applicationGroupType: 'RemoteApp' + hostpoolName: '' + name: '<>dvagmin001' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "applicationGroupType": { + "value": "RemoteApp" + }, + "hostpoolName": { + "value": "" + }, + "name": { + "value": "<>dvagmin001" + } + } +} +``` + +
+

From f9fa86ce091eceec6d5c90c79facb55753b53c27 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 3 Sep 2022 16:16:09 +0200 Subject: [PATCH 2/9] Added missing prop --- .../applicationgroups/.test/default/dependencies.bicep | 1 + .../applicationgroups/.test/min/dependencies.bicep | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep index 3fdc3b8e2e..d9b11aa7c6 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep @@ -14,6 +14,7 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018- resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { name: hostPoolName + location: location properties: { hostPoolType: 'Pooled' loadBalancerType: 'BreadthFirst' diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep index 3fdc3b8e2e..d9b11aa7c6 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep @@ -14,6 +14,7 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018- resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { name: hostPoolName + location: location properties: { hostPoolType: 'Pooled' loadBalancerType: 'BreadthFirst' From 72f7615798e11f2048f485984670be67810445d2 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 8 Sep 2022 19:05:43 +0200 Subject: [PATCH 3/9] Updated folder default to common. --- .../.test/{default => common}/dependencies.bicep | 0 .../.test/{default => common}/deploy.test.bicep | 0 .../Microsoft.DesktopVirtualization/applicationgroups/readme.md | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename modules/Microsoft.DesktopVirtualization/applicationgroups/.test/{default => common}/dependencies.bicep (100%) rename modules/Microsoft.DesktopVirtualization/applicationgroups/.test/{default => common}/deploy.test.bicep (100%) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep similarity index 100% rename from modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/dependencies.bicep rename to modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/dependencies.bicep diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep similarity index 100% rename from modules/Microsoft.DesktopVirtualization/applicationgroups/.test/default/deploy.test.bicep rename to modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md index 40f8530b22..6d91848797 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md @@ -168,7 +168,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 4fd8ad1144138ba835d2f3411ca42740265fe854 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 12:50:44 +0200 Subject: [PATCH 4/9] Update to latest --- .../applicationgroups/.test/common/deploy.test.bicep | 4 ++-- .../applicationgroups/.test/min/deploy.test.bicep | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep index e8ec6288b5..56e37caa14 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep @@ -10,8 +10,8 @@ param resourceGroupName string = 'ms.desktopvirtualization.applicationgroups-${s @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 = 'dvagdef' +@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 = 'dvagcom' // =========== // // Deployments // diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep index fc0e520d1e..4ba1ead671 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep @@ -10,7 +10,7 @@ param resourceGroupName string = 'ms.desktopvirtualization.applicationgroups-${s @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 = 'dvagmin' // =========== // From 6c07256b47237dfa8c0c6ba6cd319fd386c2e467 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:03:42 +0200 Subject: [PATCH 5/9] Update to latest --- .../applicationgroups/.test/common/deploy.test.bicep | 6 +++--- .../applicationgroups/.test/min/deploy.test.bicep | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep index 56e37caa14..1febdea621 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.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.desktopvirtualization.applicationgroups-${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 = 'dvagcom' // =========== // diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep index 4ba1ead671..b9d05fd254 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.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.desktopvirtualization.applicationgroups-${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 = 'dvagmin' // =========== // From 69b5160fd6bf3359233d1b838010bef8923d8db0 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:43:41 +0200 Subject: [PATCH 6/9] Update to latest --- .../applicationgroups/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md index 0c09d1fbc4..f597d51d56 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/readme.md @@ -177,12 +177,12 @@ The following module usage examples are retrieved from the content of the files ```bicep module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-dvagdef' + name: '${uniqueString(deployment().name)}-test-dvagcom' params: { // Required parameters applicationGroupType: 'RemoteApp' hostpoolName: '' - name: '<>dvagdef001' + name: '<>dvagcom001' // Non-required parameters applications: [ { @@ -243,7 +243,7 @@ module applicationgroups './Microsoft.DesktopVirtualization/applicationgroups/de "value": "" }, "name": { - "value": "<>dvagdef001" + "value": "<>dvagcom001" }, // Non-required parameters "applications": { From f41c626e203f6a2a33931d8a3178a90ab319c387 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:14:34 +0200 Subject: [PATCH 7/9] Update modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep --- .../applicationgroups/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep index 1febdea621..c7dcafd8f9 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/common/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.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.desktopvirtualization.applicationgroups-${serviceShort}-rg' From 7b37961053b6520dbe4bb7e6d6f95938ac8c8053 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:14:46 +0200 Subject: [PATCH 8/9] Update modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep --- .../applicationgroups/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep index b9d05fd254..055267ee30 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.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.desktopvirtualization.applicationgroups-${serviceShort}-rg' From 949a2f5641c4fb269fe44079111fcd4308e1ca8d Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 12 Oct 2022 11:25:57 +0200 Subject: [PATCH 9/9] Cleanup --- .../applicationgroups/.test/min/dependencies.bicep | 11 ----------- .../applicationgroups/.test/min/deploy.test.bicep | 1 - 2 files changed, 12 deletions(-) diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep index d9b11aa7c6..a11899cd86 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/dependencies.bicep @@ -1,17 +1,9 @@ @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 - @description('Required. The name of the Host Pool to create.') param hostPoolName string -resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { - name: managedIdentityName - location: location -} - resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { name: hostPoolName location: location @@ -22,8 +14,5 @@ resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2021-07-12' = { } } -@description('The principal ID of the created Managed Identity.') -output managedIdentityPrincipalId string = managedIdentity.properties.principalId - @description('The resource ID of the created Host Pool.') output hostPoolResourceId string = hostPool.id diff --git a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep index 055267ee30..e8bd8fb8d3 100644 --- a/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep +++ b/modules/Microsoft.DesktopVirtualization/applicationgroups/.test/min/deploy.test.bicep @@ -28,7 +28,6 @@ module resourceGroupResources 'dependencies.bicep' = { scope: resourceGroup name: '${uniqueString(deployment().name, location)}-paramNested' params: { - managedIdentityName: 'dep-<>-msi-${serviceShort}' hostPoolName: 'dep-<>-hp-${serviceShort}' } }