From 2783aa50f9f76dda27fd1d74031d53b697c8cf32 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 30 Aug 2022 20:59:54 +0200 Subject: [PATCH 1/7] [Modules] Updated Authorization/PolicySetDefinitions to new dependency approach --- .../ms.authorization.policysetdefinitions.yml | 3 +- .../.test/mg.min.parameters.json | 23 --- .../.test/mg.min/deploy.test.bicep | 30 +++ .../.test/mg.parameters.json | 66 ------- .../.test/mg/deploy.test.bicep | 64 +++++++ .../.test/sub.min.parameters.json | 26 --- .../.test/sub.min/deploy.test.bicep | 32 ++++ .../.test/sub.parameters.json | 66 ------- .../.test/sub/deploy.test.bicep | 64 +++++++ .../policySetDefinitions/readme.md | 178 +++++++++--------- utilities/tools/Set-ModuleReadMe.ps1 | 6 +- 11 files changed, 283 insertions(+), 275 deletions(-) delete mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min.parameters.json create mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep delete mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/mg.parameters.json create mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep delete mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min.parameters.json create mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep delete mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/sub.parameters.json create mode 100644 modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep diff --git a/.github/workflows/ms.authorization.policysetdefinitions.yml b/.github/workflows/ms.authorization.policysetdefinitions.yml index d1bd00c8d4..0e40d0496a 100644 --- a/.github/workflows/ms.authorization.policysetdefinitions.yml +++ b/.github/workflows/ms.authorization.policysetdefinitions.yml @@ -109,8 +109,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.Authorization/policySetDefinitions/.test/mg.min.parameters.json b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min.parameters.json deleted file mode 100644 index 92f9d4ac2f..0000000000 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min.parameters.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-mg-min-policySet" - }, - "policyDefinitions": { - "value": [ - { - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" - } - ] - } - } -} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep new file mode 100644 index 0000000000..8e2d46d55b --- /dev/null +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep @@ -0,0 +1,30 @@ +targetScope = 'managementGroup' + +// ========== // +// Parameters // +// ========== // +@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 = 'apsdmgmin' + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../managementGroup/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + policyDefinitions: [ + { + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' + } + ] + } +} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.parameters.json b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.parameters.json deleted file mode 100644 index 029e2d47c8..0000000000 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.parameters.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-mg-policySet" - }, - "displayName": { - "value": "[DisplayName] This policy set definition is deployed at management group scope" - }, - "description": { - "value": "[Description] This policy set definition is deployed at management group scope" - }, - "policyDefinitionGroups": { - "value": [ - { - "name": "Network" - }, - { - "name": "ARM" - } - ] - }, - "policyDefinitions": { - "value": [ - { - "groupNames": [ - "ARM" - ], - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", - "policyDefinitionReferenceId": "Allowed locations_1" - }, - { - "groupNames": [ - "ARM" - ], - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988", - "policyDefinitionReferenceId": "Allowed locations for resource groups_1" - } - ] - }, - "metadata": { - "value": { - "category": "Security", - "version": "1" - } - }, - "managementGroupId": { - "value": "<>" - } - } -} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep new file mode 100644 index 0000000000..3c99c21e3e --- /dev/null +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep @@ -0,0 +1,64 @@ +targetScope = 'managementGroup' + +// ========== // +// Parameters // +// ========== // +@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 = 'apsdmg' + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../managementGroup/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + policyDefinitions: [ + { + groupNames: [ + 'ARM' + ] + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' + policyDefinitionReferenceId: 'Allowed locations_1' + } + { + groupNames: [ + 'ARM' + ] + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988' + policyDefinitionReferenceId: 'Allowed locations for resource groups_1' + } + ] + // Non-required parameters + description: '[Description] This policy set definition is deployed at management group scope' + displayName: '[DisplayName] This policy set definition is deployed at management group scope' + managementGroupId: last(split(managementGroup().id, '/')) + metadata: { + category: 'Security' + version: '1' + } + policyDefinitionGroups: [ + { + name: 'Network' + } + { + name: 'ARM' + } + ] + } +} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min.parameters.json b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min.parameters.json deleted file mode 100644 index f6a7e68f64..0000000000 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min.parameters.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-sub-min-policySet" - }, - "policyDefinitions": { - "value": [ - { - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" - } - ] - }, - "subscriptionId": { - "value": "<>" - } - } -} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep new file mode 100644 index 0000000000..74469951ab --- /dev/null +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep @@ -0,0 +1,32 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@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 = 'apsdsubmin' + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../subscription/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + policyDefinitions: [ + { + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' + } + ] + // Non-required parameters + subscriptionId: '<>' + } +} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.parameters.json b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.parameters.json deleted file mode 100644 index 16a92428b1..0000000000 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.parameters.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-sub-policySet" - }, - "displayName": { - "value": "[DisplayName] This policy set definition is deployed at subscription scope" - }, - "description": { - "value": "[Description] This policy set definition is deployed at subscription scope" - }, - "policyDefinitionGroups": { - "value": [ - { - "name": "Network" - }, - { - "name": "ARM" - } - ] - }, - "policyDefinitions": { - "value": [ - { - "groupNames": [ - "ARM" - ], - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c", - "policyDefinitionReferenceId": "Allowed locations_1" - }, - { - "groupNames": [ - "ARM" - ], - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988", - "policyDefinitionReferenceId": "Allowed locations for resource groups_1" - } - ] - }, - "metadata": { - "value": { - "category": "Security", - "version": "1" - } - }, - "subscriptionId": { - "value": "<>" - } - } -} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep new file mode 100644 index 0000000000..e5bde5fbcd --- /dev/null +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep @@ -0,0 +1,64 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@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 = 'apsdsub' + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../subscription/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + policyDefinitions: [ + { + groupNames: [ + 'ARM' + ] + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' + policyDefinitionReferenceId: 'Allowed locations_1' + } + { + groupNames: [ + 'ARM' + ] + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988' + policyDefinitionReferenceId: 'Allowed locations for resource groups_1' + } + ] + // Non-required parameters + description: '[Description] This policy set definition is deployed at subscription scope' + displayName: '[DisplayName] This policy set definition is deployed at subscription scope' + metadata: { + category: 'Security' + version: '1' + } + policyDefinitionGroups: [ + { + name: 'Network' + } + { + name: 'ARM' + } + ] + subscriptionId: subscription().subscriptionId + } +} diff --git a/modules/Microsoft.Authorization/policySetDefinitions/readme.md b/modules/Microsoft.Authorization/policySetDefinitions/readme.md index 6835f1765f..0d5944e9be 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/readme.md +++ b/modules/Microsoft.Authorization/policySetDefinitions/readme.md @@ -141,83 +141,18 @@ 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: Mg Min

+

Example 1: Mg

via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-policySetDefinitions' +module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdmg' params: { // Required parameters - name: '<>-mg-min-policySet' - policyDefinitions: [ - { - parameters: { - listOfAllowedLocations: { - value: [ - 'australiaeast' - ] - } - } - policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' - } - ] - } -} -``` - -
-

- -

- -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 - "name": { - "value": "<>-mg-min-policySet" - }, - "policyDefinitions": { - "value": [ - { - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" - } - ] - } - } -} -``` - -
-

- -

Example 2: Mg

- -
- -via Bicep module - -```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-policySetDefinitions' - params: { - // Required parameters - name: '<>-mg-policySet' + name: '<>apsdmg001' policyDefinitions: [ { groupNames: [ @@ -251,7 +186,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl // Non-required parameters description: '[Description] This policy set definition is deployed at management group scope' displayName: '[DisplayName] This policy set definition is deployed at management group scope' - managementGroupId: '<>' + managementGroupId: '' metadata: { category: 'Security' version: '1' @@ -282,7 +217,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "parameters": { // Required parameters "name": { - "value": "<>-mg-policySet" + "value": "<>apsdmg001" }, "policyDefinitions": { "value": [ @@ -324,7 +259,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "value": "[DisplayName] This policy set definition is deployed at management group scope" }, "managementGroupId": { - "value": "<>" + "value": "" }, "metadata": { "value": { @@ -349,18 +284,18 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl

-

Example 3: Sub Min

+

Example 2: Mg.Min

via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-policySetDefinitions' +module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdmgmin' params: { // Required parameters - name: '<>-sub-min-policySet' + name: '<>apsdmgmin001' policyDefinitions: [ { parameters: { @@ -373,8 +308,6 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' } ] - // Non-required parameters - subscriptionId: '<>' } } ``` @@ -393,7 +326,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "parameters": { // Required parameters "name": { - "value": "<>-sub-min-policySet" + "value": "<>apsdmgmin001" }, "policyDefinitions": { "value": [ @@ -408,10 +341,6 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" } ] - }, - // Non-required parameters - "subscriptionId": { - "value": "<>" } } } @@ -420,18 +349,18 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl

-

Example 4: Sub

+

Example 3: Sub

via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-policySetDefinitions' +module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdsub' params: { // Required parameters - name: '<>-sub-policySet' + name: '<>apsdsub001' policyDefinitions: [ { groupNames: [ @@ -477,7 +406,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl name: 'ARM' } ] - subscriptionId: '<>' + subscriptionId: '' } } ``` @@ -496,7 +425,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "parameters": { // Required parameters "name": { - "value": "<>-sub-policySet" + "value": "<>apsdsub001" }, "policyDefinitions": { "value": [ @@ -553,6 +482,77 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl } ] }, + "subscriptionId": { + "value": "" + } + } +} +``` + +
+

+ +

Example 4: Sub.Min

+ +
+ +via Bicep module + +```bicep +module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdsubmin' + params: { + // Required parameters + name: '<>apsdsubmin001' + policyDefinitions: [ + { + parameters: { + listOfAllowedLocations: { + value: [ + 'australiaeast' + ] + } + } + policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' + } + ] + // Non-required parameters + subscriptionId: '<>' + } +} +``` + +
+

+ +

+ +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 + "name": { + "value": "<>apsdsubmin001" + }, + "policyDefinitions": { + "value": [ + { + "parameters": { + "listOfAllowedLocations": { + "value": [ + "australiaeast" + ] + } + }, + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" + } + ] + }, + // Non-required parameters "subscriptionId": { "value": "<>" } diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index a1074fed21..6b922d65e8 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -883,9 +883,10 @@ function Set-DeploymentExamplesSection { '' ) + $TextInfo = (Get-Culture -Name 'en-US').TextInfo $moduleRoot = Split-Path $TemplateFilePath -Parent - $resourceTypeIdentifier = $moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/') - $resourceType = $resourceTypeIdentifier.Split('/')[1] + $resourceTypeIdentifier = $TextInfo.ToTitleCase($moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/')) + $resourceType = $TextInfo.ToTitleCase($resourceTypeIdentifier.Split('/')[1]) $testFilePaths = Get-ModuleTestFileList -ModulePath $moduleRoot | ForEach-Object { Join-Path $moduleRoot $_ } $RequiredParametersList = $TemplateFileContent.parameters.Keys | Where-Object { $TemplateFileContent.parameters[$_].Keys -notcontains 'defaultValue' } | Sort-Object @@ -906,7 +907,6 @@ function Set-DeploymentExamplesSection { } else { $exampleTitle = ((Split-Path $testFilePath -LeafBase) -replace '\.', ' ') -replace ' parameters', '' } - $TextInfo = (Get-Culture -Name 'en-US').TextInfo $exampleTitle = $TextInfo.ToTitleCase($exampleTitle) $SectionContent += @( '

Example {0}: {1}

' -f $pathIndex, $exampleTitle From 2a27cb1083924869a8ec49d2dc6ac939090781be Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 1 Sep 2022 10:14:19 +0200 Subject: [PATCH 2/7] Update to latest --- .../policySetDefinitions/readme.md | 8 +++---- utilities/tools/Set-ModuleReadMe.ps1 | 23 ++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/readme.md b/modules/Microsoft.Authorization/policySetDefinitions/readme.md index 0d5944e9be..6f18bd6d4c 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/readme.md +++ b/modules/Microsoft.Authorization/policySetDefinitions/readme.md @@ -148,7 +148,7 @@ The following module usage examples are retrieved from the content of the files via Bicep module ```bicep -module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdmg' params: { // Required parameters @@ -291,7 +291,7 @@ module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/depl via Bicep module ```bicep -module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdmgmin' params: { // Required parameters @@ -356,7 +356,7 @@ module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/depl via Bicep module ```bicep -module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdsub' params: { // Required parameters @@ -499,7 +499,7 @@ module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/depl via Bicep module ```bicep -module Policysetdefinitions './Microsoft.Authorization/Policysetdefinitions/deploy.bicep' = { +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdsubmin' params: { // Required parameters diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 6b922d65e8..25d22f3fff 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -51,7 +51,7 @@ function Set-ResourceTypesSection { $RelevantResourceTypeObjects = Get-NestedResourceList $TemplateFileContent | Where-Object { $_.type -notin $ResourceTypesToExclude -and $_ - } | Select-Object 'Type', 'ApiVersion' -Unique | Sort-Object Type -Culture en-US + } | Select-Object 'Type', 'ApiVersion' -Unique | Sort-Object Type -Culture 'en-US' foreach ($resourceTypeObject in $RelevantResourceTypeObjects) { $ProviderNamespace, $ResourceType = $resourceTypeObject.Type -split '/', 2 @@ -280,7 +280,7 @@ function Set-OutputsSection { '| Output Name | Type | Description |', '| :-- | :-- | :-- |' ) - foreach ($outputName in ($templateFileContent.outputs.Keys | Sort-Object -Culture en-US)) { + foreach ($outputName in ($templateFileContent.outputs.Keys | Sort-Object -Culture 'en-US')) { $output = $TemplateFileContent.outputs[$outputName] $description = $output.metadata.description.Replace("`r`n", '

').Replace("`n", '

') $SectionContent += ("| ``{0}`` | {1} | {2} |" -f $outputName, $output.type, $description) @@ -290,7 +290,7 @@ function Set-OutputsSection { '| Output Name | Type |', '| :-- | :-- |' ) - foreach ($outputName in ($templateFileContent.outputs.Keys | Sort-Object -Culture en-US)) { + foreach ($outputName in ($templateFileContent.outputs.Keys | Sort-Object -Culture 'en-US')) { $output = $TemplateFileContent.outputs[$outputName] $SectionContent += ("| ``{0}`` | {1} |" -f $outputName, $output.type) } @@ -883,10 +883,16 @@ function Set-DeploymentExamplesSection { '' ) - $TextInfo = (Get-Culture -Name 'en-US').TextInfo $moduleRoot = Split-Path $TemplateFilePath -Parent - $resourceTypeIdentifier = $TextInfo.ToTitleCase($moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/')) - $resourceType = $TextInfo.ToTitleCase($resourceTypeIdentifier.Split('/')[1]) + $fullIdentifier = $moduleRoot.Replace('\', '/').Split('/modules/')[1].TrimStart('/') + + # Get resource type and make first letter upper case. Requires manual handling as ToTitleCase lowercases everything but the first letter + $providerNamespace = ($fullIdentifier.Split('/')[0] -split '\.' | ForEach-Object { $_.Substring(0, 1).ToUpper() + $_.Substring(1) }) -join '.' + $resourceType = $fullIdentifier.Split('/')[1] + $resourceTypeUpper = $resourceType.Substring(0, 1).ToUpper() + $resourceType.Substring(1) + + $resourceTypeIdentifier = "$providerNamespace/$resourceType" + $testFilePaths = Get-ModuleTestFileList -ModulePath $moduleRoot | ForEach-Object { Join-Path $moduleRoot $_ } $RequiredParametersList = $TemplateFileContent.parameters.Keys | Where-Object { $TemplateFileContent.parameters[$_].Keys -notcontains 'defaultValue' } | Sort-Object @@ -907,7 +913,8 @@ function Set-DeploymentExamplesSection { } else { $exampleTitle = ((Split-Path $testFilePath -LeafBase) -replace '\.', ' ') -replace ' parameters', '' } - $exampleTitle = $TextInfo.ToTitleCase($exampleTitle) + $textInfo = (Get-Culture -Name 'en-US').TextInfo + $exampleTitle = $textInfo.ToTitleCase($exampleTitle) $SectionContent += @( '

Example {0}: {1}

' -f $pathIndex, $exampleTitle ) @@ -1138,7 +1145,7 @@ function Set-DeploymentExamplesSection { '```bicep', $extendedKeyVaultReferences, "module $resourceType './$resourceTypeIdentifier/deploy.bicep' = {" - " name: '`${uniqueString(deployment().name)}-$resourceType'" + " name: '`${uniqueString(deployment().name)}-$resourceTypeUpper'" ' params: {' $bicepExample.TrimEnd(), ' }' From 2c89e8ec635acdf6a90f57216c6dfa78e5baf1de Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 1 Sep 2022 11:30:58 +0200 Subject: [PATCH 3/7] Update to latest --- .../policySetDefinitions/readme.md | 79 ++----------------- 1 file changed, 7 insertions(+), 72 deletions(-) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/readme.md b/modules/Microsoft.Authorization/policySetDefinitions/readme.md index 53acdce9e3..6f18bd6d4c 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/readme.md +++ b/modules/Microsoft.Authorization/policySetDefinitions/readme.md @@ -148,76 +148,11 @@ The following module usage examples are retrieved from the content of the files via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-PolicySetDefinitions' - params: { - // Required parameters - name: '<>-mg-min-policySet' - policyDefinitions: [ - { - parameters: { - listOfAllowedLocations: { - value: [ - 'australiaeast' - ] - } - } - policyDefinitionId: '/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c' - } - ] - } -} -``` - -
-

- -

- -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 - "name": { - "value": "<>-mg-min-policySet" - }, - "policyDefinitions": { - "value": [ - { - "parameters": { - "listOfAllowedLocations": { - "value": [ - "australiaeast" - ] - } - }, - "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/e56962a6-4747-49cd-b67b-bf8b01975c4c" - } - ] - } - } -} -``` - -
-

- -

Example 2: Mg

- -
- -via Bicep module - -```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-PolicySetDefinitions' +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdmg' params: { // Required parameters - name: '<>-mg-policySet' + name: '<>apsdmg001' policyDefinitions: [ { groupNames: [ @@ -356,8 +291,8 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-PolicySetDefinitions' +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdmgmin' params: { // Required parameters name: '<>apsdmgmin001' @@ -421,8 +356,8 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl via Bicep module ```bicep -module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-PolicySetDefinitions' +module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-apsdsub' params: { // Required parameters name: '<>apsdsub001' From 5bb7e8723685a3af3b18df470a4419cfb433fdcb Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 8 Sep 2022 18:48:50 +0200 Subject: [PATCH 4/7] Updated folder default to common. --- .../policySetDefinitions/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/readme.md b/modules/Microsoft.Authorization/policySetDefinitions/readme.md index 6f18bd6d4c..4a24e2182c 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/readme.md +++ b/modules/Microsoft.Authorization/policySetDefinitions/readme.md @@ -148,7 +148,7 @@ The following module usage examples are retrieved from the content of the files via Bicep module ```bicep -module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { +module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdmg' params: { // Required parameters @@ -291,7 +291,7 @@ module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/depl via Bicep module ```bicep -module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { +module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdmgmin' params: { // Required parameters @@ -356,7 +356,7 @@ module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/depl via Bicep module ```bicep -module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { +module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdsub' params: { // Required parameters @@ -499,7 +499,7 @@ module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/depl via Bicep module ```bicep -module PolicySetDefinitions './Microsoft.Authorization/PolicySetDefinitions/deploy.bicep' = { +module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-apsdsubmin' params: { // Required parameters From 56efc585fb52afa73c7550474e4d089331e5beaf Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 12:49:21 +0200 Subject: [PATCH 5/7] Update to latest --- .../policySetDefinitions/.test/mg.min/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/mg/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/sub.min/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/sub/deploy.test.bicep | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep index 8e2d46d55b..bbd4449280 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'managementGroup' // ========== // // Parameters // // ========== // -@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 = 'apsdmgmin' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep index 3c99c21e3e..3a9a1b921a 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'managementGroup' // ========== // // Parameters // // ========== // -@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 = 'apsdmg' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep index 74469951ab..d8b80f9259 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@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 = 'apsdsubmin' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep index e5bde5fbcd..b75ca27c7f 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@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 = 'apsdsub' // ============== // From 77e39b06e53ea1f953ac97be7ae823d13ae59e84 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:02:15 +0200 Subject: [PATCH 6/7] Update to latest --- .../policySetDefinitions/.test/mg.min/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/mg/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/sub.min/deploy.test.bicep | 2 +- .../policySetDefinitions/.test/sub/deploy.test.bicep | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep index bbd4449280..4847af6d7f 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'managementGroup' // ========== // // Parameters // // ========== // -@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 = 'apsdmgmin' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep index 3a9a1b921a..5a597fa3a2 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'managementGroup' // ========== // // Parameters // // ========== // -@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 = 'apsdmg' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep index d8b80f9259..514f7b8b93 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@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 = 'apsdsubmin' // ============== // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep index b75ca27c7f..32f495b36d 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@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 = 'apsdsub' // ============== // From c8d73b01f42235bace5722a21951bdb172d69a75 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 24 Oct 2022 09:27:11 +0200 Subject: [PATCH 7/7] Updated folder names & name Prefix --- .../.test/{mg => mg.common}/deploy.test.bicep | 2 +- .../.test/{sub => sub.common}/deploy.test.bicep | 2 +- .../policySetDefinitions/readme.md | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) rename modules/Microsoft.Authorization/policySetDefinitions/.test/{mg => mg.common}/deploy.test.bicep (97%) rename modules/Microsoft.Authorization/policySetDefinitions/.test/{sub => sub.common}/deploy.test.bicep (97%) diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.common/deploy.test.bicep similarity index 97% rename from modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep rename to modules/Microsoft.Authorization/policySetDefinitions/.test/mg.common/deploy.test.bicep index 5a597fa3a2..738f4beaf6 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/mg/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/mg.common/deploy.test.bicep @@ -4,7 +4,7 @@ targetScope = 'managementGroup' // Parameters // // ========== // @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 = 'apsdmg' +param serviceShort string = 'apsdmgcom' // ============== // // Test Execution // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.common/deploy.test.bicep similarity index 97% rename from modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep rename to modules/Microsoft.Authorization/policySetDefinitions/.test/sub.common/deploy.test.bicep index 32f495b36d..905b49dcfa 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/.test/sub/deploy.test.bicep +++ b/modules/Microsoft.Authorization/policySetDefinitions/.test/sub.common/deploy.test.bicep @@ -4,7 +4,7 @@ targetScope = 'subscription' // Parameters // // ========== // @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 = 'apsdsub' +param serviceShort string = 'apsdsubcom' // ============== // // Test Execution // diff --git a/modules/Microsoft.Authorization/policySetDefinitions/readme.md b/modules/Microsoft.Authorization/policySetDefinitions/readme.md index 291fab204b..9f636f9cc8 100644 --- a/modules/Microsoft.Authorization/policySetDefinitions/readme.md +++ b/modules/Microsoft.Authorization/policySetDefinitions/readme.md @@ -142,7 +142,7 @@ The following module usage examples are retrieved from the content of the files >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Mg

+

Example 1: Mg.Common

@@ -150,10 +150,10 @@ The following module usage examples are retrieved from the content of the files ```bicep module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-apsdmg' + name: '${uniqueString(deployment().name)}-test-apsdmgcom' params: { // Required parameters - name: '<>apsdmg001' + name: '<>apsdmgcom001' policyDefinitions: [ { groupNames: [ @@ -218,7 +218,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "parameters": { // Required parameters "name": { - "value": "<>apsdmg001" + "value": "<>apsdmgcom001" }, "policyDefinitions": { "value": [ @@ -350,7 +350,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl

-

Example 3: Sub

+

Example 3: Sub.Common

@@ -358,10 +358,10 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl ```bicep module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-apsdsub' + name: '${uniqueString(deployment().name)}-test-apsdsubcom' params: { // Required parameters - name: '<>apsdsub001' + name: '<>apsdsubcom001' policyDefinitions: [ { groupNames: [ @@ -426,7 +426,7 @@ module policySetDefinitions './Microsoft.Authorization/policySetDefinitions/depl "parameters": { // Required parameters "name": { - "value": "<>apsdsub001" + "value": "<>apsdsubcom001" }, "policyDefinitions": { "value": [