From 21a15291505cf84c9143239453b1054ed6878edd Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 20:10:43 +0100 Subject: [PATCH 01/15] Update to latest --- .github/actions/templates/validateModuleApis/action.yml | 6 +++++- .github/actions/templates/validateModuleGeneral/action.yml | 6 +++++- arm/.global/global.module.tests.ps1 | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/actions/templates/validateModuleApis/action.yml b/.github/actions/templates/validateModuleApis/action.yml index 2b4c6d35d7..14a94ff3af 100644 --- a/.github/actions/templates/validateModuleApis/action.yml +++ b/.github/actions/templates/validateModuleApis/action.yml @@ -28,13 +28,17 @@ runs: - name: 'Run API tests via (Pester)' shell: pwsh run: | + $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { + (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 + } + # --------------------- # # INVOKE PESTER TEST(S) # # --------------------- # Invoke-Pester -Configuration @{ Run = @{ Container = New-PesterContainer -Path 'arm/.global/global.module.tests.ps1' -Data @{ - moduleFolderPaths = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}" + moduleFolderPaths = $moduleFolderPaths } } Filter = @{ diff --git a/.github/actions/templates/validateModuleGeneral/action.yml b/.github/actions/templates/validateModuleGeneral/action.yml index a8b472babc..da531e93d5 100644 --- a/.github/actions/templates/validateModuleGeneral/action.yml +++ b/.github/actions/templates/validateModuleGeneral/action.yml @@ -30,13 +30,17 @@ runs: - name: 'Run tests via (Pester)' shell: pwsh run: | + $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { + (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 + } + # --------------------- # # INVOKE PESTER TEST(S) # # --------------------- # Invoke-Pester -Configuration @{ Run = @{ Container = New-PesterContainer -Path 'arm/.global/global.module.tests.ps1' -Data @{ - moduleFolderPaths = Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}" + moduleFolderPaths = $moduleFolderPaths } } Filter = @{ diff --git a/arm/.global/global.module.tests.ps1 b/arm/.global/global.module.tests.ps1 index 4fb0598c88..4813433864 100644 --- a/arm/.global/global.module.tests.ps1 +++ b/arm/.global/global.module.tests.ps1 @@ -1,7 +1,7 @@ #Requires -Version 7 param ( - [array] $moduleFolderPaths = ((Get-ChildItem (Split-Path (Get-Location) -Parent) -Recurse -Directory -Force).FullName | Where-Object { + [array] $moduleFolderPaths = ((Get-ChildItem (Split-Path $PSScriptRoot -Parent) -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 }) ) From ed2c8e84ef32e0770cabac4cbbdef537f1a0f240 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 20:14:20 +0100 Subject: [PATCH 02/15] Update to latest --- .github/actions/templates/validateModuleApis/action.yml | 4 ++++ .github/actions/templates/validateModuleGeneral/action.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/actions/templates/validateModuleApis/action.yml b/.github/actions/templates/validateModuleApis/action.yml index 14a94ff3af..2744b345e2 100644 --- a/.github/actions/templates/validateModuleApis/action.yml +++ b/.github/actions/templates/validateModuleApis/action.yml @@ -31,6 +31,10 @@ runs: $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } + Write-Verbose "Execute tests in path(s):" -Verbose + foreach($moduleFolderPath in $moduleFolderPaths) { + Write-VErbose "- [($moduleFolderPath]" + } # --------------------- # # INVOKE PESTER TEST(S) # diff --git a/.github/actions/templates/validateModuleGeneral/action.yml b/.github/actions/templates/validateModuleGeneral/action.yml index da531e93d5..703d451461 100644 --- a/.github/actions/templates/validateModuleGeneral/action.yml +++ b/.github/actions/templates/validateModuleGeneral/action.yml @@ -33,6 +33,10 @@ runs: $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } + Write-Verbose "Execute tests in path(s):" -Verbose + foreach($moduleFolderPath in $moduleFolderPaths) { + Write-VErbose "- [($moduleFolderPath]" + } # --------------------- # # INVOKE PESTER TEST(S) # From fc2427e2d05550a631501822932181c11871adb1 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 20:40:20 +0100 Subject: [PATCH 03/15] Update to latest --- arm/.global/global.module.tests.ps1 | 36 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/arm/.global/global.module.tests.ps1 b/arm/.global/global.module.tests.ps1 index 4813433864..9ae9a446b3 100644 --- a/arm/.global/global.module.tests.ps1 +++ b/arm/.global/global.module.tests.ps1 @@ -45,7 +45,11 @@ Describe 'File/folder tests' -Tag Modules { It '[] Module should contain a [.parameters] folder' -TestCases $moduleFolderTestCases { param( [string] $moduleFolderPath ) - (Test-Path (Join-Path -Path $moduleFolderPath '.parameters')) | Should -Be $true + if ((Split-Path (Split-Path $moduleFolderPath -Parent) -Leaf) -like 'Microsoft.*') { + (Test-Path (Join-Path -Path $moduleFolderPath '.parameters')) | Should -Be $true + } else { + $true | Should -Be $true + } } } @@ -53,9 +57,11 @@ Describe 'File/folder tests' -Tag Modules { $folderTestCases = [System.Collections.ArrayList]@() foreach ($moduleFolderPath in $moduleFolderPaths) { - $folderTestCases += @{ - moduleFolderName = $moduleFolderPath.Replace('\', '/').Split('/arm/')[1] - moduleFolderPath = $moduleFolderPath + if (Test-Path (Join-Path $moduleFolderPath '.paramateres')) { + $folderTestCases += @{ + moduleFolderName = $moduleFolderPath.Replace('\', '/').Split('/arm/')[1] + moduleFolderPath = $moduleFolderPath + } } } @@ -402,16 +408,18 @@ Describe 'Deployment template tests' -Tag Template { $TemplateFile_AllParameterNames = $templateFile_Parameters.Keys | Sort-Object $TemplateFile_RequiredParametersNames = ($templateFile_Parameters.Keys | Where-Object { -not $templateFile_Parameters[$_].ContainsKey('defaultValue') }) | Sort-Object - $ParameterFilePaths = (Get-ChildItem (Join-Path -Path $moduleFolderPath -ChildPath '.parameters' -AdditionalChildPath '*parameters.json') -Recurse -Force).FullName - foreach ($ParameterFilePath in $ParameterFilePaths) { - $parameterFile_AllParameterNames = ((Get-Content $ParameterFilePath) | ConvertFrom-Json -AsHashtable).parameters.Keys | Sort-Object - $parameterFileTestCases += @{ - parameterFile_Path = $ParameterFilePath - parameterFile_Name = Split-Path $ParameterFilePath -Leaf - parameterFile_AllParameterNames = $parameterFile_AllParameterNames - templateFile_AllParameterNames = $TemplateFile_AllParameterNames - templateFile_RequiredParametersNames = $TemplateFile_RequiredParametersNames - tokenSettings = $Settings.parameterFileTokens + if (Test-Path (Join-Path $moduleFolderPath '.parameters')) { + $ParameterFilePaths = (Get-ChildItem (Join-Path -Path $moduleFolderPath -ChildPath '.parameters' -AdditionalChildPath '*parameters.json') -Recurse -Force).FullName + foreach ($ParameterFilePath in $ParameterFilePaths) { + $parameterFile_AllParameterNames = ((Get-Content $ParameterFilePath) | ConvertFrom-Json -AsHashtable).parameters.Keys | Sort-Object + $parameterFileTestCases += @{ + parameterFile_Path = $ParameterFilePath + parameterFile_Name = Split-Path $ParameterFilePath -Leaf + parameterFile_AllParameterNames = $parameterFile_AllParameterNames + templateFile_AllParameterNames = $TemplateFile_AllParameterNames + templateFile_RequiredParametersNames = $TemplateFile_RequiredParametersNames + tokenSettings = $Settings.parameterFileTokens + } } } From f2b7bcef599be64ee242be524f59318c0dc57872 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 21:49:17 +0100 Subject: [PATCH 04/15] Update to latest --- .../storageAccounts/blobServices/containers/deploy.bicep | 6 +++--- .../containers/immutabilityPolicies/deploy.bicep | 4 ++-- .../blobServices/containers/immutabilityPolicies/readme.md | 4 ++-- .../storageAccounts/blobServices/containers/readme.md | 6 +++--- .../storageAccounts/fileServices/deploy.bicep | 4 ++-- .../storageAccounts/fileServices/readme.md | 4 ++-- .../storageAccounts/fileServices/shares/deploy.bicep | 4 ++-- .../storageAccounts/fileServices/shares/readme.md | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/deploy.bicep index d01d694fb4..b31e368ab8 100644 --- a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/deploy.bicep @@ -5,7 +5,7 @@ param storageAccountName string @description('Optional. Name of the blob service.') param blobServicesName string = 'default' -@description('The name of the storage container to deploy') +@description('Required. The name of the storage container to deploy') param name string @description('Optional. Name of the immutable policy.') @@ -16,10 +16,10 @@ param immutabilityPolicyName string = 'default' 'Blob' 'None' ]) -@description('Specifies whether data in the container may be accessed publicly and the level of access.') +@description('Optional. Specifies whether data in the container may be accessed publicly and the level of access.') param publicAccess string = 'None' -@description('Configure immutability policy.') +@description('Optional. Configure immutability policy.') param immutabilityPolicyProperties object = {} @description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or it\'s fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'') diff --git a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/deploy.bicep index 7b3912c6b9..567075d5f3 100644 --- a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/deploy.bicep @@ -11,10 +11,10 @@ param containerName string @description('Optional. Name of the immutable policy.') param name string = 'default' -@description('The immutability period for the blobs in the container since the policy creation, in days.') +@description('Optional. The immutability period for the blobs in the container since the policy creation, in days.') param immutabilityPeriodSinceCreationInDays int = 365 -@description('This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API') +@description('Optional. This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API') param allowProtectedAppendWrites bool = true @description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') diff --git a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/readme.md b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/readme.md index 6297eed79c..db1e8e5f41 100644 --- a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/readme.md +++ b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies/readme.md @@ -12,11 +12,11 @@ This module deployes an Immutability Policy for a blob container | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | -| `allowProtectedAppendWrites` | bool | `True` | | This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API | +| `allowProtectedAppendWrites` | bool | `True` | | Optional. This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API | | `blobServicesName` | string | `default` | | Optional. Name of the blob service. | | `containerName` | string | | | Required. Name of the container to apply the policy to | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | -| `immutabilityPeriodSinceCreationInDays` | int | `365` | | The immutability period for the blobs in the container since the policy creation, in days. | +| `immutabilityPeriodSinceCreationInDays` | int | `365` | | Optional. The immutability period for the blobs in the container since the policy creation, in days. | | `name` | string | `default` | | Optional. Name of the immutable policy. | | `storageAccountName` | string | | | Required. Name of the Storage Account. | diff --git a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/readme.md b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/readme.md index 7b8d12886e..ec183fd71e 100644 --- a/arm/Microsoft.Storage/storageAccounts/blobServices/containers/readme.md +++ b/arm/Microsoft.Storage/storageAccounts/blobServices/containers/readme.md @@ -17,9 +17,9 @@ This module deployes a blob container | `blobServicesName` | string | `default` | | Optional. Name of the blob service. | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `immutabilityPolicyName` | string | `default` | | Optional. Name of the immutable policy. | -| `immutabilityPolicyProperties` | object | `{object}` | | Configure immutability policy. | -| `name` | string | | | The name of the storage container to deploy | -| `publicAccess` | string | `None` | `[Container, Blob, None]` | Specifies whether data in the container may be accessed publicly and the level of access. | +| `immutabilityPolicyProperties` | object | `{object}` | | Optional. Configure immutability policy. | +| `name` | string | | | Required. The name of the storage container to deploy | +| `publicAccess` | string | `None` | `[Container, Blob, None]` | Optional. Specifies whether data in the container may be accessed publicly and the level of access. | | `roleAssignments` | array | `[]` | | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or it's fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' | | `storageAccountName` | string | | | Required. Name of the Storage Account. | diff --git a/arm/Microsoft.Storage/storageAccounts/fileServices/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/fileServices/deploy.bicep index 6282c2e47e..d48624aa19 100644 --- a/arm/Microsoft.Storage/storageAccounts/fileServices/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/fileServices/deploy.bicep @@ -5,10 +5,10 @@ param storageAccountName string @description('Optional. The name of the file service') param name string = 'default' -@description('Protocol settings for file service') +@description('Optional. Protocol settings for file service') param protocolSettings object = {} -@description('The service properties for soft delete.') +@description('Optional. The service properties for soft delete.') param shareDeleteRetentionPolicy object = { enabled: true days: 7 diff --git a/arm/Microsoft.Storage/storageAccounts/fileServices/readme.md b/arm/Microsoft.Storage/storageAccounts/fileServices/readme.md index 3334761911..76e0c64f21 100644 --- a/arm/Microsoft.Storage/storageAccounts/fileServices/readme.md +++ b/arm/Microsoft.Storage/storageAccounts/fileServices/readme.md @@ -23,8 +23,8 @@ This module can be used to deploy a file share service into a storage account. | `logsToEnable` | array | `[StorageRead, StorageWrite, StorageDelete]` | `[StorageRead, StorageWrite, StorageDelete]` | Optional. The name of logs that will be streamed. | | `metricsToEnable` | array | `[Transaction]` | `[Transaction]` | Optional. The name of metrics that will be streamed. | | `name` | string | `default` | | Optional. The name of the file service | -| `protocolSettings` | object | `{object}` | | Protocol settings for file service | -| `shareDeleteRetentionPolicy` | object | `{object}` | | The service properties for soft delete. | +| `protocolSettings` | object | `{object}` | | Optional. Protocol settings for file service | +| `shareDeleteRetentionPolicy` | object | `{object}` | | Optional. The service properties for soft delete. | | `shares` | _[shares](shares/readme.md)_ array | `[]` | | Optional. File shares to create. | | `storageAccountName` | string | | | Required. Name of the Storage Account. | | `workspaceId` | string | | | Optional. Resource ID of a log analytics workspace. | diff --git a/arm/Microsoft.Storage/storageAccounts/fileServices/shares/deploy.bicep b/arm/Microsoft.Storage/storageAccounts/fileServices/shares/deploy.bicep index d06b175330..c1bc080671 100644 --- a/arm/Microsoft.Storage/storageAccounts/fileServices/shares/deploy.bicep +++ b/arm/Microsoft.Storage/storageAccounts/fileServices/shares/deploy.bicep @@ -5,10 +5,10 @@ param storageAccountName string @description('Optional. The name of the file service') param fileServicesName string = 'default' -@description('The name of the file share to create') +@description('Required. The name of the file share to create') param name string -@description('The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.') +@description('Optional. The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.') param sharedQuota int = 5120 @description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or it\'s fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'') diff --git a/arm/Microsoft.Storage/storageAccounts/fileServices/shares/readme.md b/arm/Microsoft.Storage/storageAccounts/fileServices/shares/readme.md index 330e7afc8e..bd76d94986 100644 --- a/arm/Microsoft.Storage/storageAccounts/fileServices/shares/readme.md +++ b/arm/Microsoft.Storage/storageAccounts/fileServices/shares/readme.md @@ -15,9 +15,9 @@ This module deploys a storage account file share. | :-- | :-- | :-- | :-- | :-- | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `fileServicesName` | string | `default` | | Optional. The name of the file service | -| `name` | string | | | The name of the file share to create | +| `name` | string | | | Required. The name of the file share to create | | `roleAssignments` | array | `[]` | | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or it's fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' | -| `sharedQuota` | int | `5120` | | The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. | +| `sharedQuota` | int | `5120` | | Optional. The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. | | `storageAccountName` | string | | | Required. Name of the Storage Account. | ### Parameter Usage: `roleAssignments` From 30610e97070dd634ce0d58800f9ddeb99f68d667 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 21:51:08 +0100 Subject: [PATCH 05/15] Update to latest --- .github/actions/templates/validateModuleApis/action.yml | 2 +- .github/actions/templates/validateModuleGeneral/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/templates/validateModuleApis/action.yml b/.github/actions/templates/validateModuleApis/action.yml index 2744b345e2..40a4efcc7d 100644 --- a/.github/actions/templates/validateModuleApis/action.yml +++ b/.github/actions/templates/validateModuleApis/action.yml @@ -33,7 +33,7 @@ runs: } Write-Verbose "Execute tests in path(s):" -Verbose foreach($moduleFolderPath in $moduleFolderPaths) { - Write-VErbose "- [($moduleFolderPath]" + Write-VErbose "- [($moduleFolderPath]" -Verbose } # --------------------- # diff --git a/.github/actions/templates/validateModuleGeneral/action.yml b/.github/actions/templates/validateModuleGeneral/action.yml index 703d451461..686258ffd5 100644 --- a/.github/actions/templates/validateModuleGeneral/action.yml +++ b/.github/actions/templates/validateModuleGeneral/action.yml @@ -35,7 +35,7 @@ runs: } Write-Verbose "Execute tests in path(s):" -Verbose foreach($moduleFolderPath in $moduleFolderPaths) { - Write-VErbose "- [($moduleFolderPath]" + Write-VErbose "- [($moduleFolderPath]" -Verbose } # --------------------- # From aea7dffe0ca68045f3a924d6731e3c025c980aa3 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 22:08:13 +0100 Subject: [PATCH 06/15] Update to latest --- .../virtualMachineScaleSets/extensions/deploy.bicep | 2 +- .../virtualMachineScaleSets/extensions/readme.md | 4 ++-- .../managedClusters/agentPools/.bicep/nested_cuaId.bicep | 0 .../managedClusters/agentPools/deploy.bicep | 8 ++++++++ .../managedClusters/agentPools/readme.md | 1 + .../factories/integrationRuntime/deploy.bicep | 2 +- .../factories/integrationRuntime/readme.md | 2 +- 7 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 arm/Microsoft.ContainerService/managedClusters/agentPools/.bicep/nested_cuaId.bicep diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/deploy.bicep b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/deploy.bicep index 07d85fd7c0..f78d7bafd1 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/deploy.bicep +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/deploy.bicep @@ -64,7 +64,7 @@ resource extension 'Microsoft.Compute/virtualMachineScaleSets/extensions@2021-07 output extensionName string = extension.name @description('The ResourceId of the extension') -output extensionId string = extension.id +output extensionResourceId string = extension.id @description('The name of the Resource Group the extension was created in.') output extensionResourceGroup string = resourceGroup().name diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md index 976228fcd2..ca786a0c28 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md @@ -16,7 +16,7 @@ This module deploys a virtual machine scale set extension. | `cuaId` | string | | | Optional. Customer Usage Attribution id (GUID). This GUID must be previously registered | | `enableAutomaticUpgrade` | bool | | | Required. Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available | | `forceUpdateTag` | string | | | Optional. How the extension handler should be forced to update even if the extension configuration has not changed | -| `name` | string | | | Required. The name of the virtual machine extension | +| `name` | string | | | Required. The name of the virtual machine scale set extension | | `protectedSettings` | secureObject | `{object}` | | Optional. Any object that contains the extension specific protected settings | | `publisher` | string | | | Required. The name of the extension handler publisher | | `settings` | object | `{object}` | | Optional. Any object that contains the extension specific settings | @@ -29,9 +29,9 @@ This module deploys a virtual machine scale set extension. | Output Name | Type | Description | | :-- | :-- | :-- | -| `extensionId` | string | The ResourceId of the extension | | `extensionName` | string | The name of the extension | | `extensionResourceGroup` | string | The name of the Resource Group the extension was created in. | +| `extensionResourceId` | string | The ResourceId of the extension | ## Template references diff --git a/arm/Microsoft.ContainerService/managedClusters/agentPools/.bicep/nested_cuaId.bicep b/arm/Microsoft.ContainerService/managedClusters/agentPools/.bicep/nested_cuaId.bicep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep b/arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep index 1bded3b3f8..36823bafb2 100644 --- a/arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep +++ b/arm/Microsoft.ContainerService/managedClusters/agentPools/deploy.bicep @@ -8,6 +8,14 @@ param name string @description('Required. Properties for the container service agent pool profile.') param agentPoolProperties object +@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') +param cuaId string = '' + +module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { + name: 'pid-${cuaId}' + params: {} +} + resource managedCluster 'Microsoft.ContainerService/managedClusters@2021-08-01' existing = { name: managedClusterName } diff --git a/arm/Microsoft.ContainerService/managedClusters/agentPools/readme.md b/arm/Microsoft.ContainerService/managedClusters/agentPools/readme.md index 929311fc88..1091b3d82a 100644 --- a/arm/Microsoft.ContainerService/managedClusters/agentPools/readme.md +++ b/arm/Microsoft.ContainerService/managedClusters/agentPools/readme.md @@ -13,6 +13,7 @@ This module deploys an Agent Pool for a Container Service Managed Cluster | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | | `agentPoolProperties` | object | | | Required. Properties for the container service agent pool profile. | +| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `managedClusterName` | string | | | Required. Name of the managed cluster | | `name` | string | | | Required. Name of the agent pool | diff --git a/arm/Microsoft.DataFactory/factories/integrationRuntime/deploy.bicep b/arm/Microsoft.DataFactory/factories/integrationRuntime/deploy.bicep index 6024eb2cfc..86f19b1f17 100644 --- a/arm/Microsoft.DataFactory/factories/integrationRuntime/deploy.bicep +++ b/arm/Microsoft.DataFactory/factories/integrationRuntime/deploy.bicep @@ -51,4 +51,4 @@ output integrationRuntimeResourceGroup string = resourceGroup().name output integrationRuntimeName string = integrationRuntime.name @description('The resource ID of the Integration Runtime.') -output integrationRuntimeId string = integrationRuntime.id +output integrationRuntimeResourceId string = integrationRuntime.id diff --git a/arm/Microsoft.DataFactory/factories/integrationRuntime/readme.md b/arm/Microsoft.DataFactory/factories/integrationRuntime/readme.md index b972253723..a5cea90237 100644 --- a/arm/Microsoft.DataFactory/factories/integrationRuntime/readme.md +++ b/arm/Microsoft.DataFactory/factories/integrationRuntime/readme.md @@ -36,9 +36,9 @@ This module deploys a Managed or Self-Hosted Integration Runtime for an Azure Da | Output Name | Type | Description | | :-- | :-- | :-- | -| `integrationRuntimeId` | string | The resource ID of the Integration Runtime. | | `integrationRuntimeName` | string | The name of the Integration Runtime. | | `integrationRuntimeResourceGroup` | string | The name of the Resource Group the Integration Runtime was created in. | +| `integrationRuntimeResourceId` | string | The resource ID of the Integration Runtime. | ## Template references From 52298ce336fbf336fbdfaaca35d0f3bfb866ff36 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 22:19:16 +0100 Subject: [PATCH 07/15] Update to latest --- .../factories/managedVirtualNetwork/deploy.bicep | 2 +- .../factories/managedVirtualNetwork/readme.md | 2 +- .../scopedResources/.bicep/nested_cuaId.bicep | 1 + .../privateLinkScopes/scopedResources/deploy.bicep | 8 ++++++++ .../privateLinkScopes/scopedResources/readme.md | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 arm/Microsoft.Insights/privateLinkScopes/scopedResources/.bicep/nested_cuaId.bicep diff --git a/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/deploy.bicep b/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/deploy.bicep index aa1873db2c..d7fb66b938 100644 --- a/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/deploy.bicep +++ b/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/deploy.bicep @@ -29,4 +29,4 @@ output managedVirtualNetworkResourceGroup string = resourceGroup().name output managedVirtualNetworkName string = managedVirtualNetwork.name @description('The resource ID of the Managed Virtual Network.') -output managedVirtualNetworkId string = managedVirtualNetwork.id +output managedVirtualNetworkResourceId string = managedVirtualNetwork.id diff --git a/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/readme.md b/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/readme.md index 3eccf786ea..41b63992bd 100644 --- a/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/readme.md +++ b/arm/Microsoft.DataFactory/factories/managedVirtualNetwork/readme.md @@ -20,9 +20,9 @@ This module deploys a Managed Virtual Network for an Azure Data Factory | Output Name | Type | Description | | :-- | :-- | :-- | -| `managedVirtualNetworkId` | string | The resource ID of the Managed Virtual Network. | | `managedVirtualNetworkName` | string | The name of the Managed Virtual Network. | | `managedVirtualNetworkResourceGroup` | string | The name of the Resource Group the Managed Virtual Network was created in. | +| `managedVirtualNetworkResourceId` | string | The resource ID of the Managed Virtual Network. | ## Template references diff --git a/arm/Microsoft.Insights/privateLinkScopes/scopedResources/.bicep/nested_cuaId.bicep b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/.bicep/nested_cuaId.bicep new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/.bicep/nested_cuaId.bicep @@ -0,0 +1 @@ + diff --git a/arm/Microsoft.Insights/privateLinkScopes/scopedResources/deploy.bicep b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/deploy.bicep index 802618094b..cfa305476a 100644 --- a/arm/Microsoft.Insights/privateLinkScopes/scopedResources/deploy.bicep +++ b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/deploy.bicep @@ -9,6 +9,14 @@ param privateLinkScopeName string @description('Required. The resource ID of the scoped Azure monitor resource.') param linkedResourceId string +@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') +param cuaId string = '' + +module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { + name: 'pid-${cuaId}' + params: {} +} + resource privateLinkScope 'microsoft.insights/privateLinkScopes@2021-07-01-preview' existing = { name: privateLinkScopeName } diff --git a/arm/Microsoft.Insights/privateLinkScopes/scopedResources/readme.md b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/readme.md index 86fd014e13..efaa3a8276 100644 --- a/arm/Microsoft.Insights/privateLinkScopes/scopedResources/readme.md +++ b/arm/Microsoft.Insights/privateLinkScopes/scopedResources/readme.md @@ -12,6 +12,7 @@ This module deploys Insights PrivateLinkScopes ScopedResources. | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | +| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `linkedResourceId` | string | | | Required. The resource ID of the scoped Azure monitor resource. | | `name` | string | | | Required. Name of the private link scoped resource. | | `privateLinkScopeName` | string | | | Required. Name of the parent private link scope. | From f505b0a1f1c5914fad20fef61d3a9094cf53e551 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 22:32:38 +0100 Subject: [PATCH 08/15] Update to latest --- .../privateDnsZoneGroups/.bicep/nested_cuaId.bicep | 1 + .../privateEndpoints/privateDnsZoneGroups/deploy.bicep | 8 ++++++++ .../privateEndpoints/privateDnsZoneGroups/readme.md | 1 + .../workspaces/savedSearches/deploy.bicep | 2 +- .../workspaces/savedSearches/readme.md | 2 +- .../workspaces/storageInsightConfigs/deploy.bicep | 2 +- .../workspaces/storageInsightConfigs/readme.md | 2 +- .../vaults/protectionContainers/deploy.bicep | 4 ++-- .../vaults/protectionContainers/readme.md | 2 +- .../backupLongTermRetentionPolicies/deploy.bicep | 8 ++++++++ .../databases/backupLongTermRetentionPolicies/readme.md | 1 + .../backupShortTermRetentionPolicies/deploy.bicep | 8 ++++++++ .../databases/backupShortTermRetentionPolicies/readme.md | 1 + 13 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/.bicep/nested_cuaId.bicep diff --git a/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/.bicep/nested_cuaId.bicep b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/.bicep/nested_cuaId.bicep new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/.bicep/nested_cuaId.bicep @@ -0,0 +1 @@ + diff --git a/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/deploy.bicep b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/deploy.bicep index 19a8abd2ff..65dec2719c 100644 --- a/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/deploy.bicep +++ b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/deploy.bicep @@ -7,6 +7,14 @@ param privateDNSResourceIds array @description('Optional. The name of the private DNS Zone Group') param name string = 'default' +@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') +param cuaId string = '' + +module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { + name: 'pid-${cuaId}' + params: {} +} + var privateDnsZoneConfigs = [for privateDNSResourceId in privateDNSResourceIds: { name: privateEndpointName properties: { diff --git a/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/readme.md b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/readme.md index 3b2426b0ce..765e567808 100644 --- a/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/readme.md +++ b/arm/Microsoft.Network/privateEndpoints/privateDnsZoneGroups/readme.md @@ -12,6 +12,7 @@ This module deploys a private endpoint private DNS zone group | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | +| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `name` | string | `default` | | Optional. The name of the private DNS Zone Group | | `privateDNSResourceIds` | array | | | Required. List of private DNS resource IDs | | `privateEndpointName` | string | | | Required. The name of the private endpoint | diff --git a/arm/Microsoft.OperationalInsights/workspaces/savedSearches/deploy.bicep b/arm/Microsoft.OperationalInsights/workspaces/savedSearches/deploy.bicep index 1e8c049e8c..1c695428b4 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/savedSearches/deploy.bicep +++ b/arm/Microsoft.OperationalInsights/workspaces/savedSearches/deploy.bicep @@ -4,7 +4,7 @@ param logAnalyticsWorkspaceName string @description('Required. Name of the saved search') param name string -@description('Requried. Display name for the search.') +@description('Required. Display name for the search.') param displayName string @description('Required. Query category.') diff --git a/arm/Microsoft.OperationalInsights/workspaces/savedSearches/readme.md b/arm/Microsoft.OperationalInsights/workspaces/savedSearches/readme.md index 25da034e38..fa855c012c 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/savedSearches/readme.md +++ b/arm/Microsoft.OperationalInsights/workspaces/savedSearches/readme.md @@ -14,7 +14,7 @@ This template deploys a saved search for a Log Analytics workspace. | :-- | :-- | :-- | :-- | :-- | | `category` | string | | | Required. Query category. | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | -| `displayName` | string | | | Requried. Display name for the search. | +| `displayName` | string | | | Required. Display name for the search. | | `functionAlias` | string | | | Optional. The function alias if query serves as a function.. | | `functionParameters` | string | | | Optional. The optional function parameters if query serves as a function. Value should be in the following format: "param-name1:type1 = default_value1, param-name2:type2 = default_value2". For more examples and proper syntax please refer to /azure/kusto/query/functions/user-defined-functions. | | `logAnalyticsWorkspaceName` | string | | | Required. Name of the Log Analytics workspace | diff --git a/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/deploy.bicep b/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/deploy.bicep index 194f46dbc7..10824556b4 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/deploy.bicep +++ b/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/deploy.bicep @@ -1,7 +1,7 @@ @description('Required. Name of the Log Analytics workspace.') param logAnalyticsWorkspaceName string -@description('The name of the storage insights config') +@description('Optional. The name of the storage insights config') param name string = last(split(storageAccountId, '/')) @description('Required. The Azure Resource Manager ID of the storage account resource.') diff --git a/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/readme.md b/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/readme.md index a298d7043d..4bde3c81c3 100644 --- a/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/readme.md +++ b/arm/Microsoft.OperationalInsights/workspaces/storageInsightConfigs/readme.md @@ -15,7 +15,7 @@ This template deploys a storage insights configuration for a Log Analytics works | `containers` | array | `[]` | | Optional. The names of the blob containers that the workspace should read. | | `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `logAnalyticsWorkspaceName` | string | | | Required. Name of the Log Analytics workspace. | -| `name` | string | `[last(split(parameters('storageAccountId'), '/'))]` | | The name of the storage insights config | +| `name` | string | `[last(split(parameters('storageAccountId'), '/'))]` | | Optional. The name of the storage insights config | | `storageAccountId` | string | | | Required. The Azure Resource Manager ID of the storage account resource. | | `tables` | array | `[]` | | Optional. The names of the Azure tables that the workspace should read. | | `tags` | object | `{object}` | | Optional. Tags to configure in the resource. | diff --git a/arm/Microsoft.RecoveryServices/vaults/protectionContainers/deploy.bicep b/arm/Microsoft.RecoveryServices/vaults/protectionContainers/deploy.bicep index 36d5c8aa0b..1fba846d58 100644 --- a/arm/Microsoft.RecoveryServices/vaults/protectionContainers/deploy.bicep +++ b/arm/Microsoft.RecoveryServices/vaults/protectionContainers/deploy.bicep @@ -61,8 +61,8 @@ resource protectionContainer 'Microsoft.RecoveryServices/vaults/backupFabrics/pr @description('The name of the Resource Group the Protection Container was created in.') output protectionContainerResourceGroup string = resourceGroup().name -@description('The Resource ID of the Protection Container.') -output protectionContainerId string = protectionContainer.id +@description('The resource ID of the Protection Container.') +output protectionContainerResourceId string = protectionContainer.id @description('The Name of the Protection Container.') output protectionContainerName string = protectionContainer.name diff --git a/arm/Microsoft.RecoveryServices/vaults/protectionContainers/readme.md b/arm/Microsoft.RecoveryServices/vaults/protectionContainers/readme.md index c529e31582..82425cc183 100644 --- a/arm/Microsoft.RecoveryServices/vaults/protectionContainers/readme.md +++ b/arm/Microsoft.RecoveryServices/vaults/protectionContainers/readme.md @@ -24,7 +24,7 @@ This module deploys a Protection Container for a Recovery Services Vault | Output Name | Type | Description | | :-- | :-- | :-- | -| `protectionContainerId` | string | The Resource ID of the Protection Container. | +| `protectionContainerResourceId` | string | The resource ID of the Protection Container. | | `protectionContainerName` | string | The Name of the Protection Container. | | `protectionContainerResourceGroup` | string | The name of the Resource Group the Protection Container was created in. | diff --git a/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/deploy.bicep b/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/deploy.bicep index f2d2e3cb77..072194f8a6 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/deploy.bicep +++ b/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/deploy.bicep @@ -19,6 +19,14 @@ param monthlyRetention string = 'P1Y' @description('Optional. The yearly retention policy for an LTR backup in an ISO 8601 format.') param yearlyRetention string = 'P5Y' +@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') +param cuaId string = '' + +module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { + name: 'pid-${cuaId}' + params: {} +} + resource managedInstance 'Microsoft.Sql/managedInstances@2021-05-01-preview' existing = { name: managedInstanceName diff --git a/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/readme.md b/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/readme.md index e87bf2a732..9955ecd97d 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/readme.md +++ b/arm/Microsoft.Sql/managedInstances/databases/backupLongTermRetentionPolicies/readme.md @@ -12,6 +12,7 @@ This module deploys a backup long-term retention policies for SQL Managed Instan | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | +| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `databaseName` | string | | | Required. The name of the managed instance database | | `managedInstanceName` | string | | | Required. Name of the managed instance. | | `monthlyRetention` | string | `P1Y` | | Optional. The monthly retention policy for an LTR backup in an ISO 8601 format. | diff --git a/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/deploy.bicep b/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/deploy.bicep index 8c90ae28c1..19cb137a24 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/deploy.bicep +++ b/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/deploy.bicep @@ -10,6 +10,14 @@ param managedInstanceName string @description('Optional. The backup retention period in days. This is how many days Point-in-Time Restore will be supported.') param retentionDays int = 35 +@description('Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered') +param cuaId string = '' + +module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) { + name: 'pid-${cuaId}' + params: {} +} + resource managedInstance 'Microsoft.Sql/managedInstances@2021-05-01-preview' existing = { name: managedInstanceName diff --git a/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/readme.md b/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/readme.md index c31e70263a..b8a66de610 100644 --- a/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/readme.md +++ b/arm/Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies/readme.md @@ -13,6 +13,7 @@ This module deploys a backup short-term retention policies for SQL Managed Insta | Parameter Name | Type | Default Value | Possible Values | Description | | :-- | :-- | :-- | :-- | :-- | +| `cuaId` | string | | | Optional. Customer Usage Attribution ID (GUID). This GUID must be previously registered | | `databaseName` | string | | | Required. The name of the SQL managed instance database | | `managedInstanceName` | string | | | Required. Name of the SQL managed instance. | | `name` | string | | | Required. The name of the Short Term Retention backup policy. For example "default". | From b360e5551a078c863e1d873aa604ff6a13133137 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 9 Dec 2021 22:36:55 +0100 Subject: [PATCH 09/15] Update to latest --- arm/Microsoft.Sql/servers/firewallRules/deploy.bicep | 2 +- arm/Microsoft.Sql/servers/firewallRules/readme.md | 2 +- arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep | 2 +- arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arm/Microsoft.Sql/servers/firewallRules/deploy.bicep b/arm/Microsoft.Sql/servers/firewallRules/deploy.bicep index 1595a03c4e..f5b76d2d95 100644 --- a/arm/Microsoft.Sql/servers/firewallRules/deploy.bicep +++ b/arm/Microsoft.Sql/servers/firewallRules/deploy.bicep @@ -35,7 +35,7 @@ resource firewallRule 'Microsoft.Sql/servers/firewallRules@2021-05-01-preview' = output databaseName string = firewallRule.name @description('The resource ID of the deployed firewall rule') -output databaseId string = firewallRule.id +output databaseResourceId string = firewallRule.id @description('The resourceGroup of the deployed firewall rule') output databaseResourceGroup string = resourceGroup().name diff --git a/arm/Microsoft.Sql/servers/firewallRules/readme.md b/arm/Microsoft.Sql/servers/firewallRules/readme.md index 400bc071ad..2ed62c149c 100644 --- a/arm/Microsoft.Sql/servers/firewallRules/readme.md +++ b/arm/Microsoft.Sql/servers/firewallRules/readme.md @@ -22,7 +22,7 @@ This module deploys an SQL Server Firewall rule. | Output Name | Type | Description | | :-- | :-- | :-- | -| `databaseId` | string | The resource ID of the deployed firewall rule | +| `databaseResourceId` | string | The resource ID of the deployed firewall rule | | `databaseName` | string | The name of the deployed firewall rule | | `databaseResourceGroup` | string | The resourceGroup of the deployed firewall rule | diff --git a/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep b/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep index db750252fe..a5f88ba2ae 100644 --- a/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep +++ b/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep @@ -60,7 +60,7 @@ resource securityAlertPolicy 'Microsoft.Sql/servers/securityAlertPolicies@2021-0 output databaseName string = securityAlertPolicy.name @description('The resourceId of the deployed security alert policy') -output databaseId string = securityAlertPolicy.id +output databaseResourceId string = securityAlertPolicy.id @description('The resourceGroup of the deployed security alert policy') output databaseResourceGroup string = resourceGroup().name diff --git a/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md b/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md index 30930169fb..8e401ab082 100644 --- a/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md +++ b/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md @@ -27,7 +27,7 @@ This module deploys an SQL Server Security Alert Policy. | Output Name | Type | Description | | :-- | :-- | :-- | -| `databaseId` | string | The resourceId of the deployed security alert policy | +| `databaseResourceId` | string | The resourceId of the deployed security alert policy | | `databaseName` | string | The name of the deployed security alert policy | | `databaseResourceGroup` | string | The resourceGroup of the deployed security alert policy | From 2fb8638c55c175cbe7af58e4ab2ea83aea2a9937 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 10 Dec 2021 08:54:43 +0100 Subject: [PATCH 10/15] Update to latest --- .../virtualMachineScaleSets/extensions/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md index ca786a0c28..49762c337c 100644 --- a/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md +++ b/arm/Microsoft.Compute/virtualMachineScaleSets/extensions/readme.md @@ -31,7 +31,7 @@ This module deploys a virtual machine scale set extension. | :-- | :-- | :-- | | `extensionName` | string | The name of the extension | | `extensionResourceGroup` | string | The name of the Resource Group the extension was created in. | -| `extensionResourceId` | string | The ResourceId of the extension | +| `extensionResourceId` | string | The resource ID of the extension | ## Template references From ef259d50c5c4d87fbf323f538d391af1dc46fe5f Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sun, 12 Dec 2021 21:44:12 +0100 Subject: [PATCH 11/15] Update to latest --- .github/actions/templates/validateModulePester/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/templates/validateModulePester/action.yml b/.github/actions/templates/validateModulePester/action.yml index 20b2781e57..cfbd08abe3 100644 --- a/.github/actions/templates/validateModulePester/action.yml +++ b/.github/actions/templates/validateModulePester/action.yml @@ -39,7 +39,7 @@ runs: } # --------------------- # - # INVOKE PESTER TEST(S) # + # Invoke Pester test(s) # # --------------------- # Invoke-Pester -Configuration @{ Run = @{ @@ -81,7 +81,7 @@ runs: } # --------------------- # - # INVOKE PESTER TEST(S) # + # Invoke Pester test(s) # # --------------------- # Invoke-Pester -Configuration @{ Run = @{ From f7eaa7b90efb5af137405fa706f5f942385efecf Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 15 Dec 2021 11:27:13 +0100 Subject: [PATCH 12/15] Update to latest --- .../module.jobs.validate.yml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.azuredevops/pipelineTemplates/module.jobs.validate.yml b/.azuredevops/pipelineTemplates/module.jobs.validate.yml index 368888f5f9..3f468cf688 100644 --- a/.azuredevops/pipelineTemplates/module.jobs.validate.yml +++ b/.azuredevops/pipelineTemplates/module.jobs.validate.yml @@ -129,10 +129,18 @@ jobs: ScriptType: InlineScript pwsh: true inline: | + $moduleFolderPaths = (Get-ChildItem (Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') -Recurse -Directory -Force).FullName | Where-Object { + (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 + } + Write-Verbose "Execute tests in path(s):" -Verbose + foreach($moduleFolderPath in $moduleFolderPaths) { + Write-Verbose "- [($moduleFolderPath]" -Verbose + } + Invoke-Pester -Configuration @{ Run = @{ Container = New-PesterContainer -Path (Join-Path '$(moduleRepoRoot)' 'arm' '.global' 'global.module.tests.ps1') -Data @{ - moduleFolderPaths = Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}' + moduleFolderPaths = $moduleFolderPaths } } Filter = @{ @@ -225,10 +233,18 @@ jobs: ScriptType: InlineScript pwsh: true inline: | + $moduleFolderPaths = (Get-ChildItem (Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') -Recurse -Directory -Force).FullName | Where-Object { + (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 + } + Write-Verbose "Execute tests in path(s):" -Verbose + foreach($moduleFolderPath in $moduleFolderPaths) { + Write-Verbose "- [($moduleFolderPath]" -Verbose + } + Invoke-Pester -Configuration @{ Run = @{ Container = New-PesterContainer -Path (Join-Path '$(moduleRepoRoot)' 'arm' '.global' 'global.module.tests.ps1') -Data @{ - moduleFolderPaths = Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}' + moduleFolderPaths = $moduleFolderPaths } } Filter = @{ From c271c59e5830f9e62ca4ce1ee26a0f08a9084028 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 15 Dec 2021 11:41:48 +0100 Subject: [PATCH 13/15] Update to latest --- .azuredevops/pipelineTemplates/module.jobs.validate.yml | 6 ++++-- .github/actions/templates/validateModulePester/action.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.azuredevops/pipelineTemplates/module.jobs.validate.yml b/.azuredevops/pipelineTemplates/module.jobs.validate.yml index 3f468cf688..062a5fb080 100644 --- a/.azuredevops/pipelineTemplates/module.jobs.validate.yml +++ b/.azuredevops/pipelineTemplates/module.jobs.validate.yml @@ -129,7 +129,8 @@ jobs: ScriptType: InlineScript pwsh: true inline: | - $moduleFolderPaths = (Get-ChildItem (Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') -Recurse -Directory -Force).FullName | Where-Object { + $moduleFolderPaths = @(Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') + $moduleFolderPaths += (Get-ChildItem $moduleFolderPaths -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } Write-Verbose "Execute tests in path(s):" -Verbose @@ -233,7 +234,8 @@ jobs: ScriptType: InlineScript pwsh: true inline: | - $moduleFolderPaths = (Get-ChildItem (Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') -Recurse -Directory -Force).FullName | Where-Object { + $moduleFolderPaths = @(Join-Path '$(moduleRepoRoot)' '${{ parameters.modulePath }}') + $moduleFolderPaths += (Get-ChildItem $moduleFolderPaths -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } Write-Verbose "Execute tests in path(s):" -Verbose diff --git a/.github/actions/templates/validateModulePester/action.yml b/.github/actions/templates/validateModulePester/action.yml index cfbd08abe3..227233f7b8 100644 --- a/.github/actions/templates/validateModulePester/action.yml +++ b/.github/actions/templates/validateModulePester/action.yml @@ -30,7 +30,8 @@ runs: - name: 'Run global tests via Pester' shell: pwsh run: | - $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { + $moduleFolderPaths = @(Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") + $moduleFolderPaths += (Get-ChildItem $moduleFolderPaths -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } Write-Verbose "Execute tests in path(s):" -Verbose @@ -72,7 +73,8 @@ runs: - name: 'Run API tests via Pester' shell: pwsh run: | - $moduleFolderPaths = (Get-ChildItem (Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") -Recurse -Directory -Force).FullName | Where-Object { + $moduleFolderPaths = @(Join-Path $env:GITHUB_WORKSPACE "${{ inputs.modulePath }}") + $moduleFolderPaths += (Get-ChildItem $moduleFolderPaths -Recurse -Directory -Force).FullName | Where-Object { (Get-ChildItem $_ -File -Depth 0 -Include @('deploy.json', 'deploy.bicep') -Force).Count -gt 0 } Write-Verbose "Execute tests in path(s):" -Verbose From 6f48610720a74efc70f9be187837adaaee8d2b16 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 20 Dec 2021 10:49:39 +0100 Subject: [PATCH 14/15] Update arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep b/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep index cf22bb2ab4..c043733454 100644 --- a/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep +++ b/arm/Microsoft.Sql/servers/securityAlertPolicies/deploy.bicep @@ -59,7 +59,7 @@ resource securityAlertPolicy 'Microsoft.Sql/servers/securityAlertPolicies@2021-0 @description('The name of the deployed security alert policy') output databaseName string = securityAlertPolicy.name -@description('The resourceId of the deployed security alert policy') +@description('The resource ID of the deployed security alert policy') output databaseResourceId string = securityAlertPolicy.id @description('The resourceGroup of the deployed security alert policy') From dffcf475e4a91eb46309929423d05ed1618c3251 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 20 Dec 2021 10:49:44 +0100 Subject: [PATCH 15/15] Update arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md b/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md index dbf08e55eb..87c40b7fa9 100644 --- a/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md +++ b/arm/Microsoft.Sql/servers/securityAlertPolicies/readme.md @@ -27,7 +27,7 @@ This module deploys an SQL Server Security Alert Policy. | Output Name | Type | Description | | :-- | :-- | :-- | -| `databaseResourceId` | string | The resourceId of the deployed security alert policy | +| `databaseResourceId` | string | The resource ID of the deployed security alert policy | | `databaseName` | string | The name of the deployed security alert policy | | `databaseResourceGroup` | string | The resourceGroup of the deployed security alert policy |