From 10a3030b4e938f6b8a905c91fa1cac49555884d0 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 21 Sep 2022 22:11:50 +0200 Subject: [PATCH 1/7] Updated Insight DiagnosticSettings to new dependencies approach --- .../ms.insights.diagnosticsettings.yml | 3 +- .../.test/common/dependencies.bicep | 3 + .../.test/common/deploy.test.bicep | 62 +++++++++++++++++++ .../.test/min/deploy.test.bicep | 17 +++++ .../diagnosticSettings/.test/parameters.json | 24 ------- .../diagnosticSettings/readme.md | 56 +++++++++++++---- .../staticValidation/module.tests.ps1 | 8 ++- utilities/tools/Set-ModuleReadMe.ps1 | 23 +++++-- 8 files changed, 153 insertions(+), 43 deletions(-) create mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep create mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep create mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/parameters.json diff --git a/.github/workflows/ms.insights.diagnosticsettings.yml b/.github/workflows/ms.insights.diagnosticsettings.yml index edd2a96273..23cdae924c 100644 --- a/.github/workflows/ms.insights.diagnosticsettings.yml +++ b/.github/workflows/ms.insights.diagnosticsettings.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.Insights/diagnosticSettings/.test/common/dependencies.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep new file mode 100644 index 0000000000..e0a19befb3 --- /dev/null +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep @@ -0,0 +1,3 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep new file mode 100644 index 0000000000..b11faf8796 --- /dev/null +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep @@ -0,0 +1,62 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes') +@maxLength(90) +param resourceGroupName string = 'ms.insights.diagnosticsettings-${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 = 'idscom' + +// =========== // +// 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: { + } +} + +// 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' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + diagnosticLogsRetentionInDays: 7 + diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId + diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + } +} diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..3adf0beab5 --- /dev/null +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep @@ -0,0 +1,17 @@ +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 = 'idsmin' + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + } +} diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/parameters.json b/modules/Microsoft.Insights/diagnosticSettings/.test/parameters.json deleted file mode 100644 index 2e1d38512a..0000000000 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/parameters.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-diag-x-001" - }, - "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.Insights/diagnosticSettings/readme.md b/modules/Microsoft.Insights/diagnosticSettings/readme.md index 5ec7eb3251..901baeeb9a 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/readme.md +++ b/modules/Microsoft.Insights/diagnosticSettings/readme.md @@ -51,7 +51,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: Parameters

+

Example 1: Common

@@ -59,14 +59,14 @@ The following module usage examples are retrieved from the content of the files ```bicep module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-DiagnosticSettings' + name: '${uniqueString(deployment().name)}-test-idscom' params: { - 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' - name: '<>-az-diag-x-001' + diagnosticStorageAccountId: '' + diagnosticWorkspaceId: '' + name: '<>idscom001' } } ``` @@ -84,22 +84,22 @@ module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep' "contentVersion": "1.0.0.0", "parameters": { "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": "" }, "name": { - "value": "<>-az-diag-x-001" + "value": "<>idscom001" } } } @@ -107,3 +107,35 @@ module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep'

+ +

Example 2: Min

+ +
+ +via Bicep module + +```bicep +module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-idsmin' + params: { + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": {} +} +``` + +
+

diff --git a/utilities/pipelines/staticValidation/module.tests.ps1 b/utilities/pipelines/staticValidation/module.tests.ps1 index 5148281387..b005759b0d 100644 --- a/utilities/pipelines/staticValidation/module.tests.ps1 +++ b/utilities/pipelines/staticValidation/module.tests.ps1 @@ -342,7 +342,13 @@ Describe 'Readme tests' -Tag Readme { $expectedColumnsInOrder += @('Description') $readMeCategoryIndex = $readMeContent | Select-String -Pattern "^\*\*$paramCategory parameters\*\*$" | ForEach-Object { $_.LineNumber } - $readmeCategoryColumns = ($readMeContent[$readMeCategoryIndex] -split '\|') | ForEach-Object { $_.Trim() } | Where-Object { -not [String]::IsNullOrEmpty($_) } + + $tableStartIndex = $readMeCategoryIndex + while ($readMeContent[$tableStartIndex] -notlike '*|*' -and -not ($tableStartIndex -ge $readMeContent.count)) { + $tableStartIndex++ + } + + $readmeCategoryColumns = ($readMeContent[$tableStartIndex] -split '\|') | ForEach-Object { $_.Trim() } | Where-Object { -not [String]::IsNullOrEmpty($_) } $readmeCategoryColumns | Should -Be $expectedColumnsInOrder } diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 2f11c50319..4850cd4c97 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -166,7 +166,6 @@ function Set-ParametersSection { # 2. Create header including optional columns $newSectionContent += @( ('**{0} parameters**' -f $category), - (''), ('| Parameter Name | Type | {0}{1}Description |' -f ($hasDefault ? 'Default Value | ' : ''), ($hasAllowed ? 'Allowed Values | ' : '')), ('| :-- | :-- | {0}{1}:-- |' -f ($hasDefault ? ':-- | ' : ''), ($hasAllowed ? ':-- | ' : '')) ) @@ -650,6 +649,11 @@ function ConvertTo-FormattedJSONParameterObject { [string] $BicepParamBlock ) + if ([String]::IsNullOrEmpty($BicepParamBlock)) { + # Case: No mandatory parameters + return @{} + } + # [1/4] Detect top level params for later processing $bicepParamBlockArray = $BicepParamBlock -split '\n' $topLevelParamIndent = ([regex]::Match($bicepParamBlockArray[0], '^(\s+).*')).Captures.Groups[1].Value.Length @@ -966,8 +970,14 @@ function Set-DeploymentExamplesSection { $rawBicepExampleArray = $rawBicepExample -split '\n' $moduleDeploymentPropertyIndent = ([regex]::Match($rawBicepExampleArray[1], '^(\s+).*')).Captures.Groups[1].Value.Length $paramsStartIndex = ($rawBicepExampleArray | Select-String ("^[\s]{$moduleDeploymentPropertyIndent}params:[\s]*\{") | ForEach-Object { $_.LineNumber - 1 })[0] + 1 - $paramsEndIndex = ($rawBicepExampleArray[($paramsStartIndex + 1)..($rawBicepExampleArray.Count)] | Select-String "^[\s]{$moduleDeploymentPropertyIndent}\}" | ForEach-Object { $_.LineNumber - 1 })[0] + $paramsStartIndex - $paramBlock = ($rawBicepExampleArray[$paramsStartIndex..$paramsEndIndex] | Out-String).TrimEnd() + if ($rawBicepExampleArray[($paramsStartIndex + 1)].Trim() -ne '}') { + # Handle case where param block is empty + $paramsEndIndex = ($rawBicepExampleArray[($paramsStartIndex + 1)..($rawBicepExampleArray.Count)] | Select-String "^[\s]{$moduleDeploymentPropertyIndent}\}" | ForEach-Object { $_.LineNumber - 1 })[0] + $paramsStartIndex + $paramBlock = ($rawBicepExampleArray[$paramsStartIndex..$paramsEndIndex] | Out-String).TrimEnd() + } else { + $paramBlock = '' + $paramsEndIndex = $paramsStartIndex + } # [5/6] Convert Bicep parameter block to JSON parameter block to enable processing $conversionInputObject = @{ @@ -987,7 +997,12 @@ function Set-DeploymentExamplesSection { # --------------------- # if ($addBicep) { - $formattedBicepExample = $rawBicepExample[0..($paramsStartIndex - 1)] + ($bicepExample -split '\n') + $rawBicepExample[($paramsEndIndex + 1)..($rawBicepExample.Count)] + if ([String]::IsNullOrEmpty($paramBlock)) { + # Handle case where param block is empty + $formattedBicepExample = $rawBicepExample[0..($paramsStartIndex - 1)] + $rawBicepExample[($paramsEndIndex)..($rawBicepExample.Count)] + } else { + $formattedBicepExample = $rawBicepExample[0..($paramsStartIndex - 1)] + ($bicepExample -split '\n') + $rawBicepExample[($paramsEndIndex + 1)..($rawBicepExample.Count)] + } $SectionContent += @( '', From d156fe9baf1ecffec1eb0ddc8f6b71805e271853 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sun, 25 Sep 2022 11:14:01 +0200 Subject: [PATCH 2/7] Removed leftover --- .../diagnosticSettings/.test/common/dependencies.bicep | 3 --- .../diagnosticSettings/.test/common/deploy.test.bicep | 7 ------- 2 files changed, 10 deletions(-) delete mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep deleted file mode 100644 index e0a19befb3..0000000000 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/common/dependencies.bicep +++ /dev/null @@ -1,3 +0,0 @@ -@description('Optional. The location to deploy to.') -param location string = resourceGroup().location - diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep index b11faf8796..d2a7882285 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep @@ -24,13 +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: { - } -} - // Diagnostics // =========== module diagnosticDependencies '../../../../.shared/dependencyConstructs/diagnostic.dependencies.bicep' = { From 83cb6820dfa56ed62108b4d18950165003f28ca6 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 27 Sep 2022 19:28:20 +0200 Subject: [PATCH 3/7] Small update --- utilities/tools/Set-ModuleReadMe.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 4850cd4c97..2a097d2015 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -166,6 +166,7 @@ function Set-ParametersSection { # 2. Create header including optional columns $newSectionContent += @( ('**{0} parameters**' -f $category), + '', ('| Parameter Name | Type | {0}{1}Description |' -f ($hasDefault ? 'Default Value | ' : ''), ($hasAllowed ? 'Allowed Values | ' : '')), ('| :-- | :-- | {0}{1}:-- |' -f ($hasDefault ? ':-- | ' : ''), ($hasAllowed ? ':-- | ' : '')) ) @@ -970,7 +971,7 @@ function Set-DeploymentExamplesSection { $rawBicepExampleArray = $rawBicepExample -split '\n' $moduleDeploymentPropertyIndent = ([regex]::Match($rawBicepExampleArray[1], '^(\s+).*')).Captures.Groups[1].Value.Length $paramsStartIndex = ($rawBicepExampleArray | Select-String ("^[\s]{$moduleDeploymentPropertyIndent}params:[\s]*\{") | ForEach-Object { $_.LineNumber - 1 })[0] + 1 - if ($rawBicepExampleArray[($paramsStartIndex + 1)].Trim() -ne '}') { + if ($rawBicepExampleArray[$paramsStartIndex].Trim() -ne '}') { # Handle case where param block is empty $paramsEndIndex = ($rawBicepExampleArray[($paramsStartIndex + 1)..($rawBicepExampleArray.Count)] | Select-String "^[\s]{$moduleDeploymentPropertyIndent}\}" | ForEach-Object { $_.LineNumber - 1 })[0] + $paramsStartIndex $paramBlock = ($rawBicepExampleArray[$paramsStartIndex..$paramsEndIndex] | Out-String).TrimEnd() From 0719343155c5a4cd7883dc7dbb80d71c13ee8733 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Mon, 3 Oct 2022 22:12:04 +0200 Subject: [PATCH 4/7] Removed min test --- .../.test/min/deploy.test.bicep | 17 ---------- .../diagnosticSettings/readme.md | 32 ------------------- 2 files changed, 49 deletions(-) delete mode 100644 modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep deleted file mode 100644 index 3adf0beab5..0000000000 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/min/deploy.test.bicep +++ /dev/null @@ -1,17 +0,0 @@ -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 = 'idsmin' - -// ============== // -// Test Execution // -// ============== // - -module testDeployment '../../deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-${serviceShort}' - params: { - } -} diff --git a/modules/Microsoft.Insights/diagnosticSettings/readme.md b/modules/Microsoft.Insights/diagnosticSettings/readme.md index 4ec3a70b34..ff47db01c9 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/readme.md +++ b/modules/Microsoft.Insights/diagnosticSettings/readme.md @@ -108,35 +108,3 @@ module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep'

- -

Example 2: Min

- -
- -via Bicep module - -```bicep -module diagnosticSettings './Microsoft.Insights/diagnosticSettings/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-idsmin' - params: { - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": {} -} -``` - -
-

From 932607fd3d0284f8c6c73a880eacf7575fedc952 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Tue, 4 Oct 2022 19:10:23 +0200 Subject: [PATCH 5/7] Update modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../diagnosticSettings/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep index d2a7882285..f0d0480dff 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for testing purposes') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(90) param resourceGroupName string = 'ms.insights.diagnosticsettings-${serviceShort}-rg' From 179a2b57af5b001a01a44e50ab068d451b5b684d Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Tue, 4 Oct 2022 19:10:29 +0200 Subject: [PATCH 6/7] Update modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../diagnosticSettings/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep index f0d0480dff..4842b791f7 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep @@ -7,7 +7,7 @@ targetScope = 'subscription' @maxLength(90) param resourceGroupName string = 'ms.insights.diagnosticsettings-${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') From ece193d1953e53ba8df0397b3cb4b84887fd2557 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Tue, 4 Oct 2022 19:10:36 +0200 Subject: [PATCH 7/7] Update modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../diagnosticSettings/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep index 4842b791f7..6d9470d412 100644 --- a/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Insights/diagnosticSettings/.test/common/deploy.test.bicep @@ -10,7 +10,7 @@ param resourceGroupName string = 'ms.insights.diagnosticsettings-${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 = 'idscom' // =========== //